mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-30 19:40:03 -07:00
Fixed create_destination
This commit is contained in:
parent
8ebc2648d4
commit
3e952ba035
3 changed files with 24 additions and 20 deletions
|
@ -2,6 +2,7 @@ import os
|
|||
import sys
|
||||
import logging
|
||||
from subprocess import call
|
||||
from nzbToMediaUtil import create_destination
|
||||
|
||||
|
||||
Logger = logging.getLogger()
|
||||
|
@ -99,7 +100,10 @@ def extract(dirpath, file, outputDestination):
|
|||
else:
|
||||
Logger.debug("EXTRACTOR: Unknown file type: %s", ext[1])
|
||||
return False
|
||||
|
||||
|
||||
# Create outputDestination folder
|
||||
create_destination(outputDestination)
|
||||
|
||||
Logger.info("Extracting %s to %s", filePath, outputDestination)
|
||||
Logger.debug("Extracting %s %s %s", cmd, filePath, outputDestination)
|
||||
pwd = os.getcwd() # Get our Present Working Directory
|
||||
|
@ -112,6 +116,6 @@ def extract(dirpath, file, outputDestination):
|
|||
else:
|
||||
Logger.error("EXTRACTOR: Extraction failed for %s. 7zip result was %s", filePath, res)
|
||||
except:
|
||||
Logger.error("EXTRACTOR: Extraction failed for %s. Could not call command %s", filePath, cmd)
|
||||
Logger.error("EXTRACTOR: Extraction failed for %s. Could not call command %s", filePath, cmd)
|
||||
os.chdir(pwd) # Go back to our Original Working Directory
|
||||
return True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue