labs-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dr...@apache.org
Subject svn commit: r606695 - /labs/badca/BaDCA/Certificates.py
Date Mon, 24 Dec 2007 12:25:58 GMT
Author: dreid
Date: Mon Dec 24 04:25:56 2007
New Revision: 606695

URL: http://svn.apache.org/viewvc?rev=606695&view=rev
Log:
Fix a 2.4 vs 2.5 issue highlighted by Mads Toftum

Modified:
    labs/badca/BaDCA/Certificates.py

Modified: labs/badca/BaDCA/Certificates.py
URL: http://svn.apache.org/viewvc/labs/badca/BaDCA/Certificates.py?rev=606695&r1=606694&r2=606695&view=diff
==============================================================================
--- labs/badca/BaDCA/Certificates.py (original)
+++ labs/badca/BaDCA/Certificates.py Mon Dec 24 04:25:56 2007
@@ -104,6 +104,12 @@
             dt = self.info[which]
             try:
                 return datetime.strptime(dt, "%b %d %H:%M:%S %Y %Z")
+            except AttributeError:
+                try:
+                    return datetime(*time.strptime(dt, \
+                                           "%b %d %H:%M:%S %Y %Z")[0:6])
+                except:
+                    return None
             except ValueError:
                 return None        
         except KeyError:



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org


Mime
View raw message