Fixed libbe.settings_object.EMPTY output in bug/comment XML.
authorW. Trevor King <wking@drexel.edu>
Mon, 22 Jun 2009 14:02:11 +0000 (10:02 -0400)
committerW. Trevor King <wking@drexel.edu>
Mon, 22 Jun 2009 14:02:11 +0000 (10:02 -0400)
The xml() method hadn't been updated since the settings_object revamp.

libbe/bug.py
libbe/comment.py

index fe059fa91a4998fa9193e36f20a09ec47a3c3fad..59b011bd490c1a466f85c731e4a3c791c416aea9 100644 (file)
@@ -260,7 +260,7 @@ class Bug(settings_object.SavedSettingsObject):
                 ("summary", self.summary)]
         ret = '<bug>\n'
         for (k,v) in info:
-            if v is not None:
+            if v is not settings_object.EMPTY:
                 ret += '  <%s>%s</%s>\n' % (k,v,k)
 
         if show_comments == True:
index 78a6b6a39b8dc627186729af2157b83ef1d25f01..8d03a7b608e77daf10335e3cdd9a5dfef377b8e8 100644 (file)
@@ -237,7 +237,7 @@ class Comment(Tree, settings_object.SavedSettingsObject):
         lines = ["<comment>",
                  "  <uuid>%s</uuid>" % self.uuid,
                  "  <short-name>%s</short-name>" % (shortname,),]
-        if self.in_reply_to != None:
+        if self.in_reply_to != settings_object.EMPTY:
             lines.append("  <in-reply-to>%s</in-reply-to>" % self.in_reply_to)
         lines.extend([
                 "  <from>%s</from>" % self._setting_attr_string("From"),