From: Zac Medico Date: Wed, 2 Jan 2008 15:00:39 +0000 (-0000) Subject: Bug #204020 - Make grabfile() properly raise PermissionDenied when X-Git-Tag: v2.2_pre1~77 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8701c75d464eaca97a5f1d9b5a901e62adec37f6;p=portage.git Bug #204020 - Make grabfile() properly raise PermissionDenied when appropriate instead of silently ignoring permission errors. svn path=/main/trunk/; revision=9135 --- diff --git a/pym/portage/util.py b/pym/portage/util.py index 83d3fb430..39abcd81e 100644 --- a/pym/portage/util.py +++ b/pym/portage/util.py @@ -280,7 +280,9 @@ def grablines(myfilename,recursive=0): myfile = open(myfilename, "r") mylines = myfile.readlines() myfile.close() - except IOError: + except IOError, e: + if e.errno == PermissionDenied.errno: + raise PermissionDenied(myfilename) pass return mylines