pngtile.image: skip inaccessible dirs
authorTero Marttila <terom@qmsk.net>
Fri, 03 Oct 2014 21:11:40 +0300
changeset 154 e9eef49f4d57
parent 153 55f3d3bc95d3
child 155 cda90b8d94b8
pngtile.image: skip inaccessible dirs
pngtile/image.py
--- a/pngtile/image.py	Fri Oct 03 21:08:38 2014 +0300
+++ b/pngtile/image.py	Fri Oct 03 21:11:40 2014 +0300
@@ -27,6 +27,10 @@
         
         # show dirs
         if os.path.isdir(path):
+            if not os.access(path, os.R_OK):
+                # skip inaccessible dirs
+                continue
+
             yield name + '/'
 
         # examine ext