summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rwxr-xr-xutils/gen_fast_metamanifest.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/utils/gen_fast_metamanifest.py b/utils/gen_fast_metamanifest.py
index 7c06057..1ba60a3 100755
--- a/utils/gen_fast_metamanifest.py
+++ b/utils/gen_fast_metamanifest.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# vim:fileencoding=utf-8
# Ultra-optimized Meta-Manifest writing.
-# (c) 2017 Michał Górny
+# (c) 2017-2018 Michał Górny
# Licensed under the terms of 2-clause BSD license
import datetime
@@ -28,10 +28,13 @@ def manifest_dir_generator(iter_n):
for d in glob.glob(os.path.join(c, '*/')):
yield d
# md5-cache for the category
- yield os.path.join('metadata/md5-cache', c)
+ d = os.path.join('metadata/md5-cache', c)
+ if os.path.exists(d):
+ yield d
elif iter_n == 2:
# category directory
- yield c
+ if os.path.exists(c):
+ yield c
if iter_n == 1:
# few special metadata subdirectories