mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
don't promt for password. fixes #212
This commit is contained in:
parent
6571eeea2d
commit
1bab235030
1 changed files with 4 additions and 2 deletions
|
@ -118,9 +118,11 @@ def extract(filePath, outputDestination):
|
||||||
os.chdir(outputDestination) # Not all unpack commands accept full paths, so just extract into this directory
|
os.chdir(outputDestination) # Not all unpack commands accept full paths, so just extract into this directory
|
||||||
try: # now works same for nt and *nix
|
try: # now works same for nt and *nix
|
||||||
cmd.append(filePath) # add filePath to final cmd arg.
|
cmd.append(filePath) # add filePath to final cmd arg.
|
||||||
p = Popen(cmd) # should extract files fine.
|
cmd2 = cmd
|
||||||
|
cmd2.append("-p-") # don't prompt for password.
|
||||||
|
p = Popen(cmd2) # should extract files fine.
|
||||||
res = p.wait()
|
res = p.wait()
|
||||||
if res >= 0: # for windows chp returns process id if successful or -1*Error code. Linux returns 0 for successful.
|
if (res >= 0 and os.name == 'nt') or res == 0: # for windows chp returns process id if successful or -1*Error code. Linux returns 0 for successful.
|
||||||
Logger.info("EXTRACTOR: Extraction was successful for %s to %s", filePath, outputDestination)
|
Logger.info("EXTRACTOR: Extraction was successful for %s to %s", filePath, outputDestination)
|
||||||
else:
|
else:
|
||||||
Logger.info("EXTRACTOR: Attempting to extract with passwords")
|
Logger.info("EXTRACTOR: Attempting to extract with passwords")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue