Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Improved error handling reading autoProcess conf

read() was being used which will not generate an error and cause a hard to understand crash later on when trying to read something from the configuration file. This could happen if the file existed, but the permission(s) weren't okay.
  • Loading branch information...
commit c3b5ac687f0decc119d36e79a06f1b229c75387d 1 parent b3a7afe
@SerhatG SerhatG authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 autoProcessTV/
8 autoProcessTV/
@@ -51,7 +51,13 @@ def processEpisode(dirName, nzbName=None):
print "ERROR: You need an autoProcessTV.cfg file - did you rename and edit the .sample?"
+ try:
+ fp = open(configFilename, "r")
+ config.readfp(fp)
+ fp.close()
+ except IOError, e:
+ print "Could not read configuration file: ", str(e)
+ sys.exit(1)
host = config.get("SickBeard", "host")
port = config.get("SickBeard", "port")
Please sign in to comment.
Something went wrong with that request. Please try again.