mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-30 11:38:30 -07:00
use common create_destination
instead of duplicate code in both copylink and extractor
This commit is contained in:
parent
f41b576967
commit
9c34ac2a35
2 changed files with 13 additions and 17 deletions
|
@ -100,13 +100,8 @@ def extract(dirpath, file, outputDestination):
|
|||
return False
|
||||
|
||||
# Create outputDestination folder
|
||||
if not os.path.exists(outputDestination):
|
||||
try:
|
||||
Logger.debug("EXTRACTOR: Creating destination folder: %s", outputDestination)
|
||||
os.makedirs(outputDestination)
|
||||
except Exception, e:
|
||||
Logger.error("EXTRACTOR: Not possible to create destination folder: %s", e)
|
||||
return False
|
||||
create_destination(outputDestination)
|
||||
|
||||
Logger.info("Extracting %s to %s", filePath, outputDestination)
|
||||
Logger.debug("Extracting %s %s %s %s", cmd[0], cmd[1], filePath, outputDestination)
|
||||
pwd = os.getcwd() # Get our Present Working Directory
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue