patchutils.py: Silence output of patch commandline utility.

This commit is contained in:
Sebastian Lackner 2014-07-25 21:57:46 +02:00
parent 707a96d35a
commit 60632bb522

View File

@ -305,7 +305,8 @@ def apply_patch(content, patches, reverse=False, fuzz=2):
if fuzz != 2: cmdline.append("--fuzz=%d" % fuzz)
cmdline += [contentfile.name, patchfile.name]
exitcode = subprocess.call(cmdline)
with open(os.devnull, 'w') as devnull:
exitcode = subprocess.call(cmdline, stdout=devnull, stderr=devnull)
if exitcode != 0:
raise PatchApplyError("Failed to apply patch (exitcode %d)." % exitcode)