From 4baf45d3fa360cf9807f648b6529ad67852fba14 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Sat, 29 Aug 2020 15:40:12 +0200 Subject: Remove io.open() py2-ism MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Michał Górny --- utils/gen_fast_metamanifest.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'utils/gen_fast_metamanifest.py') diff --git a/utils/gen_fast_metamanifest.py b/utils/gen_fast_metamanifest.py index 0c4e43e..97368d8 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-2018 Michał Górny +# (c) 2017-2020 Michał Górny # Licensed under the terms of 2-clause BSD license import datetime @@ -19,7 +19,7 @@ import gen_fast_manifest def manifest_dir_generator(iter_n): - with io.open('profiles/categories', 'r') as f: + with open('profiles/categories', 'r') as f: categories = [x.strip() for x in f] for c in categories: @@ -83,7 +83,7 @@ def make_toplevel(d, ts, pgp_key): raise ValueError('GPG error: {}'.format(serr)) data = sout - with io.open(dsttop, 'wb') as f: + with open(dsttop, 'wb') as f: f.write(data) break @@ -93,18 +93,18 @@ def gen_metamanifest(top_dir, pgp_key): os.chdir(top_dir) # pre-populate IGNORE entries - with io.open('metadata/Manifest', 'wb') as f: + with open('metadata/Manifest', 'wb') as f: f.write(b'''IGNORE timestamp IGNORE timestamp.chk IGNORE timestamp.commit IGNORE timestamp.x ''') for mdir in ('dtd', 'glsa', 'news', 'xml-schema'): - with io.open(os.path.join('metadata', mdir, 'Manifest'), 'wb') as f: + with open(os.path.join('metadata', mdir, 'Manifest'), 'wb') as f: f.write(b'''IGNORE timestamp.chk IGNORE timestamp.commit ''') - with io.open('Manifest', 'wb') as f: + with open('Manifest', 'wb') as f: f.write(b'''IGNORE distfiles IGNORE local IGNORE lost+found -- cgit v1.2.3