From: Michael Tremer Date: Sat, 18 Sep 2010 09:33:58 +0000 (+0200) Subject: naoki: Fix epoch property of packages. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b0d78cd815f284785cf169486124bcdcdba5e88b;p=ipfire-3.x.git naoki: Fix epoch property of packages. This could be an empty string. We need to catch this case. --- diff --git a/naoki/packages.py b/naoki/packages.py index b6d746e14..1b7c71b91 100644 --- a/naoki/packages.py +++ b/naoki/packages.py @@ -48,7 +48,10 @@ class Package(object): @property def epoch(self): - return int(self._info.get("PKG_EPOCH", 0)) + epoch = self._info.get("PKG_EPOCH", None) + if not epoch: + epoch = 0 + return int(epoch) @property def name(self):