From 96385ea4e61156443e163b214726bb0933e887b0 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 13 Oct 2018 15:24:34 +0100 Subject: [Minor] Python... --- test/functional/util/merge_coveralls.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/functional/util') diff --git a/test/functional/util/merge_coveralls.py b/test/functional/util/merge_coveralls.py index a05b36d87..ddc18690d 100755 --- a/test/functional/util/merge_coveralls.py +++ b/test/functional/util/merge_coveralls.py @@ -37,7 +37,7 @@ path_mapping = [ ] parser = argparse.ArgumentParser(description='') -parser.add_argument('--input', type=open, required=True, nargs='+', help='input files') +parser.add_argument('--input', type=str, required=True, nargs='+', help='input files') parser.add_argument('--output', type=str, required=True, help='output file)') parser.add_argument('--root', type=str, required=False, default="/rspamd/src/github.com/rspamd/rspamd", help='repository root)') parser.add_argument('--install-dir', type=str, required=False, default="/rspamd/install", help='install root)') @@ -111,12 +111,12 @@ if __name__ == '__main__': prepare_path_mapping() - with args.input[0].open(encoding='utf-8-sig') as fh: + with codecs.open(args.input[0], 'r', encoding='utf-8') as fh: j1 = json.load(fh) files = merge({}, j1) for i in range(1, len(args.input)): - with args.input[i].open(encoding='utf-8-sig') as fh: + with codecs.open(args.input[i], 'r', encoding='utf-8') as fh: j2 = json.load(fh) files = merge(files, j2) -- cgit v1.2.3