summaryrefslogtreecommitdiffstats
path: root/TOOLS
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2023-10-27 19:57:31 -0500
committerDudemanguy <random342@airmail.cc>2023-10-28 02:39:48 +0000
commite76660cc54751726eee041c9b2ebd1beaff68599 (patch)
treef77dfdc07af37d2eabc77c2d30e5561316cfda84 /TOOLS
parent891efca9d79d4532f6bbe763d8f90ba837bbe0a4 (diff)
downloadmpv-e76660cc54751726eee041c9b2ebd1beaff68599.tar.bz2
mpv-e76660cc54751726eee041c9b2ebd1beaff68599.tar.xz
TOOLS/{file2string,matroska}: drop unneeded stdout output
This was originally for the waf build, and then later writing the output to a file was added for meson. Since the waf build is no longer around anymore, remove the dead code.
Diffstat (limited to 'TOOLS')
-rwxr-xr-xTOOLS/file2string.py6
-rwxr-xr-xTOOLS/matroska.py9
2 files changed, 3 insertions, 12 deletions
diff --git a/TOOLS/file2string.py b/TOOLS/file2string.py
index 1f2cd64fdf..5b1c4a95d1 100755
--- a/TOOLS/file2string.py
+++ b/TOOLS/file2string.py
@@ -39,10 +39,6 @@ def file2string(infilename, infile, outfile):
outfile.write('"' + ''.join(conv[c] for c in line) + '"\n')
if __name__ == "__main__":
- if len(sys.argv) < 2:
- outfile = sys.stdout
- else:
- outfile = open(sys.argv[2], "w")
-
+ outfile = open(sys.argv[2], "w")
with open(sys.argv[1], 'rb') as infile:
file2string(sys.argv[1], infile, outfile)
diff --git a/TOOLS/matroska.py b/TOOLS/matroska.py
index f10107e036..52bac48c92 100755
--- a/TOOLS/matroska.py
+++ b/TOOLS/matroska.py
@@ -463,15 +463,10 @@ if __name__ == "__main__":
def parse_toplevel(s):
parse_one(s, 0, None, 1 << 63)
- if len(sys.argv) < 3:
- outfile = sys.stdout
- else:
- outfile = open(sys.argv[2], "w")
-
if sys.argv[1] == '--generate-header':
- generate_C_header(outfile)
+ generate_C_header(open(sys.argv[2], "w"))
elif sys.argv[1] == '--generate-definitions':
- generate_C_definitions(outfile)
+ generate_C_definitions(open(sys.argv[2], "w"))
else:
s = open(sys.argv[1], "rb")
while 1: