From: Zac Medico Date: Wed, 2 Jan 2008 15:02:23 +0000 (-0000) Subject: Bug #204020 - Make grabfile() properly raise PermissionDenied when X-Git-Tag: v2.1.4~26 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d9524cfb061a1ae5cb802787672142db6b31c11f;p=portage.git Bug #204020 - Make grabfile() properly raise PermissionDenied when appropriate instead of silently ignoring permission errors. (trunk r9135) svn path=/main/branches/2.1.2/; revision=9136 --- diff --git a/pym/portage_util.py b/pym/portage_util.py index db93a042a..486376bfc 100644 --- a/pym/portage_util.py +++ b/pym/portage_util.py @@ -266,7 +266,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