Remove blank line from bug.xml() output when bug has no comments.
authorW. Trevor King <wking@drexel.edu>
Tue, 30 Jun 2009 15:00:46 +0000 (11:00 -0400)
committerW. Trevor King <wking@drexel.edu>
Tue, 30 Jun 2009 15:00:46 +0000 (11:00 -0400)
libbe/bug.py

index 4f297f9d4a8965d76ce1c17c642a6023998aa523..3bd0566cc44437877d3f6c67c23401a8b6fd5e98 100644 (file)
@@ -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 += '</bug>'
         return ret