Fixed logging code in autoFork

This commit is contained in:
echel0n 2014-04-12 03:29:04 -07:00
commit a2cf0d6995

View file

@ -1,15 +1,8 @@
import logging
import urllib import urllib
import nzbtomedia import nzbtomedia
from lib import requests from lib import requests
from nzbToMediaConfig import config from nzbtomedia import logger
def autoFork(inputCategory): def autoFork(inputCategory):
Logger = logging.getLogger()
# auto-detect correct section # auto-detect correct section
section = nzbtomedia.CFG.findsection(inputCategory) section = nzbtomedia.CFG.findsection(inputCategory)
if not section: if not section:
@ -34,12 +27,12 @@ def autoFork(inputCategory):
try: try:
ssl = int(nzbtomedia.CFG[section][inputCategory]["ssl"]) ssl = int(nzbtomedia.CFG[section][inputCategory]["ssl"])
except (config, ValueError): except:
ssl = 0 ssl = 0
try: try:
web_root = nzbtomedia.CFG[section][inputCategory]["web_root"] web_root = nzbtomedia.CFG[section][inputCategory]["web_root"]
except config: except:
web_root = "" web_root = ""
try: try: