fixing len() bug
This commit is contained in:
@@ -80,11 +80,12 @@ class Url:
|
|||||||
return "%s" % self.archive_url
|
return "%s" % self.archive_url
|
||||||
|
|
||||||
def __len__(self):
|
def __len__(self):
|
||||||
if self.timestamp != None:
|
if self.timestamp is None:
|
||||||
|
return None
|
||||||
|
else
|
||||||
diff = datetime.utcnow() - self.timestamp
|
diff = datetime.utcnow() - self.timestamp
|
||||||
return diff.days
|
return diff.days
|
||||||
else
|
|
||||||
return None
|
|
||||||
|
|
||||||
def _url_check(self):
|
def _url_check(self):
|
||||||
"""Check for common URL problems."""
|
"""Check for common URL problems."""
|
||||||
|
Reference in New Issue
Block a user