[Collab-qa-commits] r938 - upload-history

filippo at alioth.debian.org filippo at alioth.debian.org
Sat Jul 26 17:44:03 UTC 2008


Author: filippo
Date: 2008-07-26 17:44:03 +0000 (Sat, 26 Jul 2008)
New Revision: 938

Modified:
   upload-history/munge_ddc.py
Log:
fallback to mail message date if .changes date is unparsable

Modified: upload-history/munge_ddc.py
===================================================================
--- upload-history/munge_ddc.py	2008-07-26 14:40:10 UTC (rev 937)
+++ upload-history/munge_ddc.py	2008-07-26 17:44:03 UTC (rev 938)
@@ -113,6 +113,14 @@
 
         (c['Key'], c['Signed-By']) = extract_pgp(body)
 
+        # unparsable date, use the one from mail message
+        if not rfc822.parsedate_tz(c['Date']):
+            if rfc822.parsedate_tz(msg['Date']):
+                c['Date'] = msg['Date']
+            # this shouldn't really happen
+            else:
+                del c['Date']
+
         for field in 'Source', 'Version', 'Date', 'Changed-By', 'Maintainer', 'NMU', 'Key', 'Signed-By':
             try:
                 print "%s: %s" % (field, c[field])




More information about the Collab-qa-commits mailing list