edit PR #679 to only change Windows. Fixes #676

This commit is contained in:
clinton-hall 2015-01-19 09:34:30 +10:30
commit 9a715773be
2 changed files with 8 additions and 6 deletions

View file

@ -98,12 +98,13 @@ def extract(filePath, outputDestination):
os.chdir(outputDestination) # Not all unpack commands accept full paths, so just extract into this directory
devnull = open(os.devnull, 'w')
try: # now works same for nt and *nix
info = None
cmd.append(filePath) # add filePath to final cmd arg.
if platform.system() == 'Windows':
info = subprocess.STARTUPINFO()
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
try: # now works same for nt and *nix
cmd.append(filePath) # add filePath to final cmd arg.
if platform.system() != 'Windows':
else:
cmd = nzbtomedia.NICENESS + cmd
cmd2 = cmd
cmd2.append("-p-") # don't prompt for password.

View file

@ -25,8 +25,9 @@ import subprocess
from subprocess import CalledProcessError
import os
info = subprocess.STARTUPINFO()
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
if os.name == 'nt':
info = subprocess.STARTUPINFO()
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
# Prevent spaces from messing with us!
def _escape_param(param):