From 8701c75d464eaca97a5f1d9b5a901e62adec37f6 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 2 Jan 2008 15:00:39 +0000 Subject: [PATCH] Bug #204020 - Make grabfile() properly raise PermissionDenied when appropriate instead of silently ignoring permission errors. svn path=/main/trunk/; revision=9135 --- 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 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 -- 2.26.2