diff options
author | VG <vg@devys.org> | 2015-07-19 03:53:03 +0200 |
---|---|---|
committer | VG <vg@devys.org> | 2015-07-19 03:53:03 +0200 |
commit | 5064abaac3be3792bf40e56ce215c09f2f0c9434 (patch) | |
tree | 61508113eb4d1496145364e507dfb04e1dd39113 | |
parent | 3cbf206e350635ac1849f4b9fa519c04ad993dda (diff) | |
download | uuidxer-5064abaac3be3792bf40e56ce215c09f2f0c9434.tar.gz uuidxer-5064abaac3be3792bf40e56ce215c09f2f0c9434.tar.bz2 uuidxer-5064abaac3be3792bf40e56ce215c09f2f0c9434.zip |
skip uuid.txt creation when no files in the directory
-rwxr-xr-x | scan.py | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -35,6 +35,8 @@ def main(): db = [] with open(DB_FILENAME + '.new', 'wb') as out: for root, dirs, files in os.walk(START_DIR): + if not len(files): + continue files, uuids = partition(lambda f: '/uuid.txt' in f, (os.path.join(root, f) for f in files)) if len(uuids) == 1: |