util/misc.py
changeset 3475 ee665dca07fa
parent 2456 7373e3048167
child 3479 74cfeff6a011
equal deleted inserted replaced
3469:97622e9560b5 3475:ee665dca07fa
    40     if path is None or not os.path.isdir(path):
    40     if path is None or not os.path.isdir(path):
    41         return False
    41         return False
    42     for root, dirs, files in os.walk(path):
    42     for root, dirs, files in os.walk(path):
    43         files = [f for f in files if not f[0] == '.']
    43         files = [f for f in files if not f[0] == '.']
    44         dirs[:] = [d for d in dirs if not d[0] == '.']
    44         dirs[:] = [d for d in dirs if not d[0] == '.']
    45         for name in files:
    45         if os.access(root, os.W_OK) is not True:
    46             if os.access(root, os.W_OK) is not True or os.access(os.path.join(root, name), os.W_OK) is not True:
    46             return False
       
    47         for name in dirs + files:
       
    48             if os.access(os.path.join(root, name), os.W_OK) is not True:
    47                 return False
    49                 return False
    48     return True
    50     return True
    49 
    51 
    50 
    52 
    51 def GetClassImporter(param):
    53 def GetClassImporter(param):