summaryrefslogtreecommitdiff
path: root/lib/thandy/repository.py
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2008-11-17 07:40:36 +0000
committerNick Mathewson <nickm@torproject.org>2008-11-17 07:40:36 +0000
commit0fb8f24a63da36b79e130019ab9c6436895b6f5b (patch)
tree65e56069a064bfbb225b328acee0864b95206400 /lib/thandy/repository.py
parentd49ac7f4ceec36ad627d716ab83194c3c4b974be (diff)
Make log message not result in exception when timestamp expires.
git-svn-id: file:///home/or/svnrepo/updater/trunk@17311 55e972cd-5a19-0410-ae62-a4d7a52db4cd
Diffstat (limited to 'lib/thandy/repository.py')
-rw-r--r--lib/thandy/repository.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/thandy/repository.py b/lib/thandy/repository.py
index ad0fe4d..121c5c1 100644
--- a/lib/thandy/repository.py
+++ b/lib/thandy/repository.py
@@ -331,12 +331,13 @@ class LocalRepository:
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():