Less indenting, no duped functioned :)

This commit is contained in:
Berkona 2013-03-01 17:31:57 -05:00
commit b7b7fa9fe8

View file

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