diff options
author | Michał Górny <mgorny@gentoo.org> | 2018-03-26 23:00:06 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2018-03-26 23:00:06 +0200 |
commit | afe4a93b741d2144565ecb5bb2818637fb46cb85 (patch) | |
tree | 5d4b893d22a72a2d8eacb2e9e204162ac0b5374e /utils | |
parent | f229c4df74b6fb54f79d81a9d3cefe66669e0cfd (diff) | |
download | gemato-afe4a93b741d2144565ecb5bb2818637fb46cb85.tar.gz |
gen_fast_metamanifest: Account for empty categories
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/gen_fast_metamanifest.py | 9 |
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 |