diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-11-15 04:59:42 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-11-15 04:59:42 +0000 |
commit | 45b7b3a3900d5132e412cf5917fcd3b27b054828 (patch) | |
tree | f3e6c868f7db42c7f8b5cfcfef226e0c54116df4 | |
parent | 076a38005c19efaad184048a21d084428ebcd63f (diff) | |
download | portage-45b7b3a3900d5132e412cf5917fcd3b27b054828.tar.gz portage-45b7b3a3900d5132e412cf5917fcd3b27b054828.tar.bz2 portage-45b7b3a3900d5132e412cf5917fcd3b27b054828.zip |
Make digestgen() handle PermissionDenied internally by returning failure, so
callers like repoman don't need exception handling.
svn path=/main/trunk/; revision=11924
-rw-r--r-- | pym/portage/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 8f7defff8..d9ce6db6b 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -4260,7 +4260,11 @@ def digestgen(myarchives, mysettings, overwrite=1, manifestonly=0, myportdb=None writemsg(("!!! File %s doesn't exist, can't update " + \ "Manifest\n") % e, noiselevel=-1) return 0 - mf.write(sign=False) + try: + mf.write(sign=False) + except portage.exception.PermissionDenied, e: + writemsg("!!! Permission Denied: %s\n" % (e,), noiselevel=-1) + return 0 if "assume-digests" not in mysettings.features: distlist = mf.fhashdict.get("DIST", {}).keys() distlist.sort() |