mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-16 02:02:53 -07:00
add exception on logging close #83
This commit is contained in:
parent
b363473463
commit
2950caad33
9 changed files with 50 additions and 63 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue