From 35c26f095fe2ef2e65c9bdaac22cb7f00078bdad Mon Sep 17 00:00:00 2001 From: j Date: Wed, 8 Nov 2017 14:33:23 +0100 Subject: [PATCH] many parts might block PIPE, use /dev/null --- pandora/item/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora/item/models.py b/pandora/item/models.py index 9ded8f091..a0de71120 100644 --- a/pandora/item/models.py +++ b/pandora/item/models.py @@ -494,7 +494,7 @@ class Item(models.Model): if format == "webm": cmd = ['mkvmerge', '-o', output] cmd += [streams[0]] + ['+' + s for s in streams[1:]] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) + p = subprocess.Popen(cmd, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'), close_fds=True) p.wait() return True elif format == "mp4": @@ -502,7 +502,7 @@ class Item(models.Model): shutil.copy(streams[0], tmp_output) for s in streams[1:]: cmd = ['MP4Box', '-cat', s, tmp_output] - p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, close_fds=True) + p = subprocess.Popen(cmd, stdout=open('/dev/null', 'w'), stderr=open('/dev/null', 'w'), close_fds=True) p.wait() shutil.copy(tmp_output, output) os.unlink(tmp_output)