Commits

Anonymous committed f5b92d1

Fixed problem when a parent directory isn't readable

Comments (0)

Files changed (1)

paste/script/pluginlib.py

     
 def find_egg_info_dir(dir):
     while 1:
-        for fn in os.listdir(dir):
+        try:
+            filenames = os.listdir(dir)
+        except OSError:
+            # Probably permission denied or something
+            return None
+        for fn in filenames:
             if fn.endswith('.egg-info'):
                 return os.path.join(dir, fn)
         parent = os.path.dirname(dir)