suppressed output from 7zip

This commit is contained in:
Paweł Płazieński 2016-03-07 00:01:19 +01:00
parent 71b4e37d2d
commit f090173aca

7
napi
View file

@ -83,9 +83,10 @@ for movie_filename in args:
input_filename, # input file
]
with open(subtitle_filename, "w") as subtitle_file:
process = subprocess.Popen(executed, stdout=subtitle_file)
result = process.wait()
with open(os.devnull, 'w') as error_file:
with open(subtitle_filename, "w") as subtitle_file:
process = subprocess.Popen(executed, stdout=subtitle_file, stderr=error_file)
result = process.wait()
if result != 0:
print "%s: 7zip returned non-zero code: %s" % (movie_filename, subtitle_filename)