diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-12-17 13:08:16 -0800 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-12-17 13:08:16 -0800 |
commit | 66fa9c224f7d44e88344f8c7d24c8da16845eace (patch) | |
tree | ffd8c62f0899d395bec66c661af1c20d8487a9f0 | |
parent | 8c0c18edea6d74229dd0e14d22069daaaacd5796 (diff) | |
download | portage-66fa9c224f7d44e88344f8c7d24c8da16845eace.tar.gz portage-66fa9c224f7d44e88344f8c7d24c8da16845eace.tar.bz2 portage-66fa9c224f7d44e88344f8c7d24c8da16845eace.zip |
digestcheck: avoid display of u'' from KeyError
In python-2.x, KeyError.__str__ produces unicode literals that we
don't want users to see.
-rw-r--r-- | pym/portage/package/ebuild/digestcheck.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pym/portage/package/ebuild/digestcheck.py b/pym/portage/package/ebuild/digestcheck.py index c2c2beff3..68ce1f565 100644 --- a/pym/portage/package/ebuild/digestcheck.py +++ b/pym/portage/package/ebuild/digestcheck.py @@ -67,13 +67,12 @@ def digestcheck(myfiles, mysettings, strict=False, justmanifest=None): eout.ebegin(_("checking %s ;-)") % f) ftype = mf.findFile(f) if ftype is None: - raise KeyError(f) + eout.eend(1) + writemsg(_("\n!!! Missing digest for '%s'\n") % (f,), + noiselevel=-1) + return 0 mf.checkFileHashes(ftype, f) eout.eend(0) - except KeyError as e: - eout.eend(1) - writemsg(_("\n!!! Missing digest for %s\n") % str(e), noiselevel=-1) - return 0 except FileNotFound as e: eout.eend(1) writemsg(_("\n!!! A file listed in the Manifest could not be found: %s\n") % str(e), |