summaryrefslogtreecommitdiff
path: root/devel/management
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-02-26 22:23:08 -0600
committerDan McGee <dan@archlinux.org>2010-02-26 22:26:05 -0600
commite95c4563e328ea5e9943f72e72458e454fa7191a (patch)
treeff6ceaf855e553dc95c4269514f446c6755676a4 /devel/management
parent655b3db1b7a8a78cfd74723bd9ed17011ed0c935 (diff)
reporead: accommodate old-school build date
I can't believe we still have some of these around, but they are relatively straightforward to handle. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel/management')
-rwxr-xr-xdevel/management/commands/reporead.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index dad5d304..bf3e7a0f 100755
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -141,7 +141,10 @@ def populate_pkg(dbpkg, repopkg, timestamp=None):
dbpkg.url = repopkg.url
dbpkg.compressed_size = int(repopkg.csize)
dbpkg.installed_size = int(repopkg.isize)
- dbpkg.build_date = datetime.utcfromtimestamp(int(repopkg.builddate))
+ try:
+ dbpkg.build_date = datetime.utcfromtimestamp(int(repopkg.builddate))
+ except:
+ dbpkg.build_date = datetime.strptime(repopkg.builddate, '%a %b %d %H:%M:%S %Y')
dbpkg.needupdate = False
if timestamp: