From f090173acaafe51d165353c1f5f6741c37531169 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20P=C5=82azie=C5=84ski?= Date: Mon, 7 Mar 2016 00:01:19 +0100 Subject: [PATCH] suppressed output from 7zip --- napi | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/napi b/napi index b7b0654..1231f76 100755 --- a/napi +++ b/napi @@ -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)