Skip to content

Commit 0fb00d0

Browse files
committed
scripts: Make scripts silent
1 parent 1f37bb3 commit 0fb00d0

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

byml_to_yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ with file:
3333
elif '!!' in args.yml:
3434
sys.stderr.write('error: cannot use !! (for input filename) when reading from stdin\n')
3535
sys.exit(1)
36-
sys.stderr.write('writing to %s\n' % args.yml)
3736
output = sys.stdout if args.yml == '-' else open(args.yml, 'w')
3837
with output:
3938
yaml.dump(root, output, Dumper=dumper, allow_unicode=True)

yaz0_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
def compress(data: bytes) -> bytes:
77
return subprocess.run([_tool_name, "comp", "-", "-d-", "-C10"], input=data, stdout=subprocess.PIPE,
8-
check=True).stdout
8+
stderr=subprocess.PIPE, check=True).stdout
99

1010
def decompress(data: bytes) -> bytes:
1111
return subprocess.run([_tool_name, "de", "-", "-d-"], input=data, stdout=subprocess.PIPE,
12-
check=True).stdout
12+
stderr=subprocess.PIPE, check=True).stdout

yml_to_byml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,8 @@ with file:
4141
if args.byml != '-':
4242
extension = os.path.splitext(args.byml)[1]
4343
if extension.startswith('.s'):
44-
sys.stderr.write('compressing sbyml\n')
4544
buf = io.BytesIO(yaz0_util.compress(buf.read()))
4645

47-
sys.stderr.write('writing to %s\n' % args.byml)
4846
output = sys.stdout.buffer if args.byml == '-' else open(args.byml, 'wb')
4947
with output:
5048
shutil.copyfileobj(buf, output)

0 commit comments

Comments
 (0)