diff --git a/byml_to_yml b/byml_to_yml index c0b7ab0..d6e0d90 100755 --- a/byml_to_yml +++ b/byml_to_yml @@ -33,7 +33,6 @@ with file: elif '!!' in args.yml: sys.stderr.write('error: cannot use !! (for input filename) when reading from stdin\n') sys.exit(1) - sys.stderr.write('writing to %s\n' % args.yml) output = sys.stdout if args.yml == '-' else open(args.yml, 'w') with output: yaml.dump(root, output, Dumper=dumper, allow_unicode=True) diff --git a/yaz0_util.py b/yaz0_util.py index 9e307c6..d2695a7 100644 --- a/yaz0_util.py +++ b/yaz0_util.py @@ -5,8 +5,8 @@ def compress(data: bytes) -> bytes: return subprocess.run([_tool_name, "comp", "-", "-d-", "-C10"], input=data, stdout=subprocess.PIPE, - check=True).stdout + stderr=subprocess.PIPE, check=True).stdout def decompress(data: bytes) -> bytes: return subprocess.run([_tool_name, "de", "-", "-d-"], input=data, stdout=subprocess.PIPE, - check=True).stdout + stderr=subprocess.PIPE, check=True).stdout diff --git a/yml_to_byml b/yml_to_byml index f649bb6..7537fd6 100755 --- a/yml_to_byml +++ b/yml_to_byml @@ -41,10 +41,8 @@ with file: if args.byml != '-': extension = os.path.splitext(args.byml)[1] if extension.startswith('.s'): - sys.stderr.write('compressing sbyml\n') buf = io.BytesIO(yaz0_util.compress(buf.read())) - sys.stderr.write('writing to %s\n' % args.byml) output = sys.stdout.buffer if args.byml == '-' else open(args.byml, 'wb') with output: shutil.copyfileobj(buf, output)