From: Michael Tremer Date: Thu, 10 Mar 2011 17:55:57 +0000 (+0100) Subject: Fix reading of odd values from the database. X-Git-Tag: 0.9.3~70^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6b151a6826c53244c7fdcfb7597d9a74e4833a48;p=pakfire.git Fix reading of odd values from the database. --- diff --git a/pakfire/packages/installed.py b/pakfire/packages/installed.py index 22c2a9421..d04f34912 100644 --- a/pakfire/packages/installed.py +++ b/pakfire/packages/installed.py @@ -87,10 +87,10 @@ class DatabasePackage(Package): def build_time(self): build_time = self.metadata.get("build_time", 0) - if build_time == "X"*3: - build_time = 0 - - return int(build_time) + try: + return int(build_time) + except TypeError: + return 0 @property def build_host(self):