[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] r20000: {torctl} Remove datetime.datetime.strptime usage. It didn't exist in (torctl/trunk/python/TorCtl)



Author: mikeperry
Date: 2009-07-14 01:05:46 -0400 (Tue, 14 Jul 2009)
New Revision: 20000

Modified:
   torctl/trunk/python/TorCtl/TorCtl.py
Log:

Remove datetime.datetime.strptime usage. It didn't exist in
python 2.4. Also commit #20000 ftw.




Modified: torctl/trunk/python/TorCtl/TorCtl.py
===================================================================
--- torctl/trunk/python/TorCtl/TorCtl.py	2009-07-14 04:21:50 UTC (rev 19999)
+++ torctl/trunk/python/TorCtl/TorCtl.py	2009-07-14 05:05:46 UTC (rev 20000)
@@ -361,8 +361,8 @@
       elif rt:
         router,ip = rt.groups()
       elif pb:
-        published = datetime.datetime.strptime(pb.group(1)+" UTC",
-                                "20%y-%m-%d %H:%M:%S %Z")
+        t = time.strptime(pb.group(1)+" UTC", "20%y-%m-%d %H:%M:%S %Z")
+        published = datetime.datetime(*t[0:6])
       elif ct:
         contact = ct.group(1)
     if router != ns.nickname: