diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-09-30 15:16:03 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-09-30 15:16:03 +0000 |
commit | 7cc7ecb43807fce5eee6d7e00d41c33a9f1325f8 (patch) | |
tree | c58901e471e304b8107caa19b8256ecdf59aed6e | |
parent | 3f64053d6d09603b8b031b3020d6c09556fbf185 (diff) | |
download | portage-7cc7ecb43807fce5eee6d7e00d41c33a9f1325f8.tar.gz portage-7cc7ecb43807fce5eee6d7e00d41c33a9f1325f8.tar.bz2 portage-7cc7ecb43807fce5eee6d7e00d41c33a9f1325f8.zip |
Handle InvalidDependString from portdbapi.getFetchMap() inside
search.output(). Thanks to agaffney for reporting.
svn path=/main/trunk/; revision=11602
-rw-r--r-- | pym/_emerge/__init__.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index ac168bd1f..87269a135 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -684,12 +684,18 @@ class search(object): from portage import manifest mf = manifest.Manifest( pkgdir, self.settings["DISTDIR"]) - fetchlist = self.portdb.getFetchMap(mycpv) try: - mysum[0] = mf.getDistfilesSize(fetchlist) - except KeyError, e: - file_size_str = "Unknown (missing digest for %s)" % \ - str(e) + uri_map = self.portdb.getFetchMap(mycpv) + except portage.exception.InvalidDependString, e: + file_size_str = "Unknown (%s)" % (e,) + del e + else: + try: + mysum[0] = mf.getDistfilesSize(uri_map) + except KeyError, e: + file_size_str = "Unknown (missing " + \ + "digest for %s)" % (e,) + del e available = False for db in self._dbs: |