equal
deleted
inserted
replaced
67 '''yields (filename, size)''' |
67 '''yields (filename, size)''' |
68 if relpath: |
68 if relpath: |
69 path = os.path.join(self.path, relpath) |
69 path = os.path.join(self.path, relpath) |
70 else: |
70 else: |
71 path = self.path |
71 path = self.path |
|
72 if not os.path.isdir(path): |
|
73 return |
72 striplen = len(self.path) + len(os.sep) |
74 striplen = len(self.path) + len(os.sep) |
73 filetypes = ('.d', '.i') |
75 filetypes = ('.d', '.i') |
74 for f, size in _dirwalk(path, recurse): |
76 for f, size in _dirwalk(path, recurse): |
75 if (len(f) > 2) and f[-2:] in filetypes: |
77 if (len(f) > 2) and f[-2:] in filetypes: |
76 yield util.pconvert(f[striplen:]), size |
78 yield util.pconvert(f[striplen:]), size |