From d9524cfb061a1ae5cb802787672142db6b31c11f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 2 Jan 2008 15:02:23 +0000 Subject: [PATCH] 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 --- pym/portage_util.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.26.2