From affbd5a9bcaee4d9f9d67475a72e344ba5c61106 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 28 Nov 2007 08:27:28 +0000 Subject: [PATCH] In chk_updated_cfg_files(), avoid scanning for config files for paths that aren't writable by the current user. This prevents Permission denied errors from being triggered later when trying to scan subdirectories that are inaccessible. svn path=/main/trunk/; revision=8726 --- pym/_emerge/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 0a4c0027c..af0ecd323 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -5051,6 +5051,10 @@ def chk_updated_cfg_files(target_root, config_protect): procount=0 for x in config_protect: x = os.path.join(target_root, x.lstrip(os.path.sep)) + if not os.access(x, os.W_OK): + # Avoid Permission denied errors generated + # later by `find`. + continue try: mymode = os.lstat(x).st_mode except OSError: -- 2.26.2