mirror of
https://github.com/Tygs/0bin.git
synced 2023-08-10 21:13:00 +03:00
Fix timedelta.in_seconds support in python 2.6
This commit is contained in:
parent
d12718d9dd
commit
6959fcbed9
@ -233,7 +233,10 @@ class Paste(object):
|
|||||||
In 3 minutes, or in 3 days or the 23/01/2102
|
In 3 minutes, or in 3 days or the 23/01/2102
|
||||||
"""
|
"""
|
||||||
try:
|
try:
|
||||||
expiration = (self.expiration - datetime.now()).total_seconds()
|
expiration = self.expiration - datetime.now()
|
||||||
|
# in_seconds doesn't exist in python 2.6
|
||||||
|
expiration = expiration.days * 24 * 60 * 60 + expiration.seconds
|
||||||
|
|
||||||
except TypeError:
|
except TypeError:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user