summaryrefslogtreecommitdiff
path: root/utils/gen_fast_manifest.py
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-11-24 20:24:16 +0100
committerMichał Górny <mgorny@gentoo.org>2017-11-24 20:24:16 +0100
commitc859f53acfd137df1d388a50b467e2a68f077d48 (patch)
tree9c12c6acfb2356f45f61b610d64df600258f8438 /utils/gen_fast_manifest.py
parentcb30f42f7bc893cc674ad1a35b284d40c0f11ac6 (diff)
downloadgemato-c859f53acfd137df1d388a50b467e2a68f077d48.tar.gz
gen_fast_manifest: Simplify 'had_manifest' logic
Diffstat (limited to 'utils/gen_fast_manifest.py')
-rwxr-xr-xutils/gen_fast_manifest.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/utils/gen_fast_manifest.py b/utils/gen_fast_manifest.py
index 320b682..ccba791 100755
--- a/utils/gen_fast_manifest.py
+++ b/utils/gen_fast_manifest.py
@@ -86,17 +86,16 @@ def gen_manifest(top_dir):
manifest_entries = []
# load DIST and IGNORE entries from existing Manifest
- had_manifest = False
try:
with io.open(os.path.join(top_dir, 'Manifest'), 'rb') as f:
for l in f:
if l.startswith(b'DIST') or l.startswith(b'IGNORE'):
manifest_entries.append(l.rstrip())
+ had_manifest = True
except IOError as e:
if e.errno != errno.ENOENT:
raise
- else:
- had_manifest = True
+ had_manifest = False
# generate local file entries
compat_mode = generate_manifest_entries(manifest_entries, top_dir)