1
0
mirror of https://github.com/Tygs/0bin.git synced 2023-08-10 21:13:00 +03:00

Fixed data parsing bug

This commit is contained in:
sam
2012-04-26 16:56:13 +07:00
parent 2264d79d02
commit d1d455a41b
2 changed files with 9 additions and 13 deletions

View File

@@ -87,7 +87,8 @@ class Paste(object):
comments = paste.read()[:-1] # remove the last coma
if expiration != u'burn_after_reading':
expiration = datetime.strptime(expiration, '%Y-%m-%d %H:%M:%S.%f')
expiration = datetime.strptime(expiration.strip(),
'%Y-%m-%d %H:%M:%S.%f')
except StopIteration:
raise TypeError(u'File %s is malformed' % path)