From: Zac Medico Date: Wed, 28 Nov 2007 08:27:28 +0000 (-0000) Subject: In chk_updated_cfg_files(), avoid scanning for config files for X-Git-Tag: v2.2_pre1~289 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=affbd5a9bcaee4d9f9d67475a72e344ba5c61106;p=portage.git 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 --- 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: