Some cleanup in IsRetired()
authorStephen Gran <steve@lobefin.net>
Sat, 9 May 2009 15:00:06 +0000 (16:00 +0100)
committerStephen Gran <steve@lobefin.net>
Sat, 9 May 2009 15:00:06 +0000 (16:00 +0100)
ud-generate

index 67a50f8..d8a7090 100755 (executable)
@@ -101,10 +101,11 @@ def IsRetired(DnRecord):
       # We'll give them a few extra days over what we said
       age = 6 * 31 * 24 * 60 * 60
       try:
       # We'll give them a few extra days over what we said
       age = 6 * 31 * 24 * 60 * 60
       try:
-         if (time.time() - time.mktime(time.strptime(line[1], "%Y-%m-%d"))) > age:
-            return True
+         return (time.time() - time.mktime(time.strptime(line[1], "%Y-%m-%d"))) > age
       except IndexError:
          return False
       except IndexError:
          return False
+      except ValueError:
+         return False
 
    return False
 
 
    return False