diff options
author | Michał Górny <mgorny@gentoo.org> | 2017-11-25 12:23:47 +0100 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2017-11-25 12:23:47 +0100 |
commit | 183d7ae8e9b89de1b3166dfa7372de2b54dc2a37 (patch) | |
tree | 15820dc415604e49a0d17aa075f9e41b351be613 /utils | |
parent | e27f4b27a90bd30bcb9ec98bde7a7da48490b65f (diff) | |
download | gemato-183d7ae8e9b89de1b3166dfa7372de2b54dc2a37.tar.gz |
gen_fast_manifest: Fix GzipFile() use with empty filename
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/gen_fast_manifest.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/utils/gen_fast_manifest.py b/utils/gen_fast_manifest.py index 319e89d..6f3a071 100755 --- a/utils/gen_fast_manifest.py +++ b/utils/gen_fast_manifest.py @@ -103,9 +103,9 @@ def gen_manifest(top_dir): manifest_data = b'\n'.join(manifest_entries) + b'\n' if not compat_mode: - with gzip.GzipFile(os.path.join(top_dir, 'Manifest.gz'), 'wb', - filename='', mtime=0) as f: - f.write(manifest_data) + with open(os.path.join(top_dir, 'Manifest.gz'), 'wb') as f: + with gzip.GzipFile(fileobj=f, mode='wb', filename='', mtime=0) as gzf: + gzf.write(manifest_data) if had_manifest: os.unlink(os.path.join(top_dir, 'Manifest')) else: |