diff options
-rwxr-xr-x | bin/emerge | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/bin/emerge b/bin/emerge index c74d949ff..404e720d6 100755 --- a/bin/emerge +++ b/bin/emerge @@ -800,13 +800,16 @@ class search: pkgdir, portage.settings["DISTDIR"]) fetchlist = portage.portdb.getfetchlist(mycpv, mysettings=portage.settings, all=True)[1] - mysum[0] = mf.getDistfilesSize(fetchlist) - mystr = str(mysum[0]/1024) - mycount=len(mystr) - while (mycount > 3): - mycount-=3 - mystr=mystr[:mycount]+","+mystr[mycount:] - mysum[0]=mystr+" kB" + try: + mysum[0] = mf.getDistfilesSize(fetchlist) + mystr = str(mysum[0]/1024) + mycount=len(mystr) + while (mycount > 3): + mycount-=3 + mystr=mystr[:mycount]+","+mystr[mycount:] + mysum[0]=mystr+" kB" + except KeyError, e: + mysum[0] = "Unknown (missing digest for %s)" % str(e) if "--quiet" not in myopts: print " ", darkgreen("Latest version available:"),myversion |