Fixed create_destination

This commit is contained in:
Berkona 2013-03-01 17:29:38 -05:00
parent 8ebc2648d4
commit 3e952ba035
3 changed files with 24 additions and 20 deletions

View file

@ -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