summaryrefslogtreecommitdiff
path: root/utils/gen-test-manifest.py
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-08-29 15:40:12 +0200
committerMichał Górny <mgorny@gentoo.org>2020-08-29 15:40:12 +0200
commit4baf45d3fa360cf9807f648b6529ad67852fba14 (patch)
tree72c4f946aee5f50be8657833d5d9ba024de1ef9e /utils/gen-test-manifest.py
parent3e0b5c687d8b6216226d610e4492d20db4f1bef1 (diff)
downloadgemato-4baf45d3fa360cf9807f648b6529ad67852fba14.tar.gz
Remove io.open() py2-ism
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'utils/gen-test-manifest.py')
-rwxr-xr-xutils/gen-test-manifest.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/gen-test-manifest.py b/utils/gen-test-manifest.py
index 1dcd58a..b7c4530 100755
--- a/utils/gen-test-manifest.py
+++ b/utils/gen-test-manifest.py
@@ -1,7 +1,6 @@
#!/usr/bin/env python
import glob
-import io
import os
import os.path
import sys
@@ -47,7 +46,7 @@ def write_manifest_entries_for_dir(manifest_file, topdir, hashes):
def gen_metamanifests(top_dir, hashes):
- with io.open(os.path.join(top_dir, 'profiles/categories'), 'r') as f:
+ with open(os.path.join(top_dir, 'profiles/categories'), 'r') as f:
categories = [x.strip() for x in f]
alldirs = []
@@ -65,10 +64,10 @@ def gen_metamanifests(top_dir, hashes):
for bm in alldirs:
bmdir = os.path.join(top_dir, bm)
if not list(glob.glob(os.path.join(bmdir, 'Manifest*'))):
- with io.open(os.path.join(bmdir, 'Manifest'), 'w') as f:
+ with open(os.path.join(bmdir, 'Manifest'), 'w') as f:
write_manifest_entries_for_dir(f, bmdir, hashes)
- with io.open(os.path.join(top_dir, 'Manifest'), 'w') as f:
+ with open(os.path.join(top_dir, 'Manifest'), 'w') as f:
write_manifest_entries_for_dir(f, top_dir, hashes)