From 7d4d7d745f32b35a75586e883bba0a2ed345e72b Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 6 Oct 2008 17:43:56 +0000 Subject: [PATCH] Bug #239471 - Handle InvalidDependString from portdbapi.getfetchlist() inside search.output(). (trunk r11602) svn path=/main/branches/2.1.4/; revision=11641 --- bin/emerge | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/bin/emerge b/bin/emerge index f71536f34..61bec137d 100755 --- a/bin/emerge +++ b/bin/emerge @@ -634,13 +634,19 @@ class search: import portage_manifest as manifest mf = manifest.Manifest( pkgdir, self.settings["DISTDIR"]) - fetchlist = self.portdb.getfetchlist(mycpv, - mysettings=self.settings, all=True)[1] try: - mysum[0] = mf.getDistfilesSize(fetchlist) - except KeyError, e: - file_size_str = "Unknown (missing digest for %s)" % \ - str(e) + fetchlist = self.portdb.getfetchlist(mycpv, + mysettings=self.settings, all=True)[1] + except portage_exception.InvalidDependString, e: + file_size_str = "Unknown (%s)" % (e,) + del e + else: + try: + mysum[0] = mf.getDistfilesSize(fetchlist) + except KeyError, e: + file_size_str = "Unknown (missing " + \ + "digest for %s)" % (e,) + del e available = False for db in self._dbs: -- 2.26.2