From: W. Trevor King Date: Tue, 30 Jun 2009 15:00:46 +0000 (-0400) Subject: Remove blank line from bug.xml() output when bug has no comments. X-Git-Tag: 1.0.0~67^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=db4adfd8be31c253239a54b5ae8a90af46bded7b;p=be.git Remove blank line from bug.xml() output when bug has no comments. --- diff --git a/libbe/bug.py b/libbe/bug.py index 4f297f9..3bd0566 100644 --- a/libbe/bug.py +++ b/libbe/bug.py @@ -288,8 +288,8 @@ class Bug(settings_object.SavedSettingsObject): if show_comments == True: comout = self.comment_root.xml_thread(auto_name_map=True, bug_shortname=shortname) - ret += comout+'\n' - + if len(comout) > 0: + ret += comout+'\n' ret += '' return ret