mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-24 06:55:21 -07:00
added create_destination
This commit is contained in:
parent
8ebc2648d4
commit
b6274e31f7
1 changed files with 11 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
||||||
import logging
|
import logging
|
||||||
import logging.config
|
import logging.config
|
||||||
import os.path
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
@ -13,6 +13,16 @@ def nzbtomedia_configure_logging(dirname):
|
||||||
logging.getLogger().addHandler(fileHandler)
|
logging.getLogger().addHandler(fileHandler)
|
||||||
|
|
||||||
|
|
||||||
|
def create_destination(outputDestination):
|
||||||
|
if not os.path.exists(outputDestination):
|
||||||
|
try:
|
||||||
|
Logger.info("CREATE DESTINATION: Creating destination folder: %s", outputDestination)
|
||||||
|
os.makedirs(outputDestination)
|
||||||
|
except Exception, e:
|
||||||
|
Logger.error("CREATE DESTINATION: Not possible to create destination folder: %s. Exiting", e)
|
||||||
|
sys.exit(-1)
|
||||||
|
|
||||||
|
|
||||||
def parse_other(args):
|
def parse_other(args):
|
||||||
return os.path.normpath(sys.argv[1]), '', '', ''
|
return os.path.normpath(sys.argv[1]), '', '', ''
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue