diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-10-04 08:19:42 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-10-04 08:19:42 +0000 |
commit | cee522abd243f0344986e0125f3d47d503a05d3a (patch) | |
tree | 28e2ca96108ce6df42f9277ae0a05f054fbd1115 | |
parent | 1ad045c9b59bc8f0bd51fb74f6b9d9b650f7b6f3 (diff) | |
download | portage-cee522abd243f0344986e0125f3d47d503a05d3a.tar.gz portage-cee522abd243f0344986e0125f3d47d503a05d3a.tar.bz2 portage-cee522abd243f0344986e0125f3d47d503a05d3a.zip |
In portdbapi.aux_get(), simplify code by using string
manipulation instead of int conversion to manipulate
negative EAPI when deciding whether or not regen is
necessary.
svn path=/main/trunk/; revision=7919
-rw-r--r-- | pym/portage/dbapi/porttree.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index 824d1afc4..03550033a 100644 --- a/pym/portage/dbapi/porttree.py +++ b/pym/portage/dbapi/porttree.py @@ -284,15 +284,8 @@ class portdbapi(dbapi): mydata = self.auxdb[mylocation][mycpv] eapi = mydata.get("EAPI","").strip() if not eapi: - eapi = 0 - try: - eapi = int(eapi) - except ValueError: - # Non-integer EAPI isn't supported. In case it's supported in - # the future, assume that it's valid (rather than trigger a - # regen). - eapi = None - if eapi is not None and eapi < 0 and eapi_is_supported(-eapi): + eapi = "0" + if eapi.startswith("-") and eapi_is_supported(eapi[1:]): doregen = True elif emtime != long(mydata.get("_mtime_", 0)): doregen = True |