mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 13:53:15 -07:00
Less indenting, no duped functioned :)
This commit is contained in:
parent
24b24e140e
commit
b7b7fa9fe8
1 changed files with 13 additions and 19 deletions
|
@ -4,6 +4,9 @@ import os
|
|||
import sys
|
||||
|
||||
|
||||
Logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def nzbtomedia_configure_logging(dirname):
|
||||
logFile = os.path.join(dirname, "postprocess.log")
|
||||
logging.config.fileConfig(os.path.join(dirname, "autoProcessMedia.cfg"))
|
||||
|
@ -14,17 +17,8 @@ def nzbtomedia_configure_logging(dirname):
|
|||
|
||||
|
||||
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 create_destination(outputDestination):
|
||||
if not os.path.exists(outputDestination):
|
||||
if os.path.exists(outputDestination):
|
||||
return
|
||||
try:
|
||||
Logger.info("CREATE DESTINATION: Creating destination folder: %s", outputDestination)
|
||||
os.makedirs(outputDestination)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue