[or-cvs] r17311: {updater} Make log message not result in exception when timestamp expi (updater/trunk/lib/thandy)

nickm at seul.org nickm at seul.org
Mon Nov 17 07:40:37 UTC 2008


Author: nickm
Date: 2008-11-17 02:40:36 -0500 (Mon, 17 Nov 2008)
New Revision: 17311

Modified:
   updater/trunk/lib/thandy/repository.py
Log:
Make log message not result in exception when timestamp expires.

Modified: updater/trunk/lib/thandy/repository.py
===================================================================
--- updater/trunk/lib/thandy/repository.py	2008-11-17 06:36:07 UTC (rev 17310)
+++ updater/trunk/lib/thandy/repository.py	2008-11-17 07:40:36 UTC (rev 17311)
@@ -331,12 +331,13 @@
         ts = self._timestampFile.get()
         if ts:
             age = now - thandy.formats.parseTime(ts['at'])
-            ts = thandy.formats.TimestampFile.fromJSon(ts)
             if age > MAX_TIMESTAMP_AGE:
                 logging.info("Timestamp file from %s is out of "
                              "date; must fetch it.", ts['at'])
                 need.add(self._timestampFile.getRelativePath())
 
+            ts = thandy.formats.TimestampFile.fromJSon(ts)
+
         # If the keylist isn't signed right, we can't check the
         # signatures on anything else.
         if self._keylistFile.get():



More information about the tor-commits mailing list