Fixed mutliple in-reply-to splitting in be-mbox-to-xml
authorW. Trevor King <wking@drexel.edu>
Wed, 23 Sep 2009 14:47:17 +0000 (10:47 -0400)
committerW. Trevor King <wking@drexel.edu>
Wed, 23 Sep 2009 14:47:17 +0000 (10:47 -0400)
interfaces/xml/be-mbox-to-xml

index dc6a1c51eedbbb871df672404c5057dc078bfd79..9e5c4e6f11d418d4e23bf2df5b3a9cf107abf74b 100755 (executable)
@@ -65,11 +65,13 @@ def comment_message_to_xml(message, fields=None):
                 fields[u'in-reply-to'] = refs[0] # default to the first
     else: # check for mutliple in-reply-to references.
         refs = fields[u'in-reply-to'].split()
+        found_ref = False
         for ref in refs: # search for a known reference id.
             if ref in KNOWN_IDS:
                 fields[u'in-reply-to'] = ref
+                found_ref = True
                 break
-        if fields[u'in-reply-to'] == None and len(refs) > 0:
+        if found_ref == False and len(refs) > 0:
             fields[u'in-reply-to'] = refs[0] # default to the first
 
     if fields['alt-id'] != None: