From: Zac Medico Date: Sat, 15 Nov 2008 05:00:34 +0000 (-0000) Subject: Make digestgen() handle PermissionDenied internally by returning failure, so X-Git-Tag: v2.1.6_rc1~66 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7bcdb48a4fbaada038ee4b2d6d200f610575bf53;p=portage.git Make digestgen() handle PermissionDenied internally by returning failure, so callers like repoman don't need exception handling. (trunk r11924) svn path=/main/branches/2.1.6/; revision=11925 --- diff --git a/pym/portage/__init__.py b/pym/portage/__init__.py index 888d1ee2e..37b91aa25 100644 --- a/pym/portage/__init__.py +++ b/pym/portage/__init__.py @@ -4250,7 +4250,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()