add exception on logging close #83

This commit is contained in:
clinton-hall 2013-05-01 13:35:26 +09:30
parent b363473463
commit 2950caad33
9 changed files with 50 additions and 63 deletions

View file

@ -39,14 +39,8 @@ def processEpisode(dirName, nzbName=None, status=0):
Logger.error("You need an autoProcessMedia.cfg file - did you rename and edit the .sample?")
return 1 # failure
try:
fp = open(configFilename, "r")
config.readfp(fp)
fp.close()
except IOError, e:
Logger.error("Could not read configuration file: %s", str(e))
return 1 # failure
config.read(configFilename)
host = config.get("Mylar", "host")
port = config.get("Mylar", "port")
username = config.get("Mylar", "username")
@ -80,8 +74,8 @@ def processEpisode(dirName, nzbName=None, status=0):
try:
urlObj = myOpener.openit(url)
except IOError, e:
Logger.error("Unable to open URL: %s", str(e))
except:
Logger.exception("Unable to open URL")
return 1 # failure
result = urlObj.readlines()