Permalink
Browse files

Merge pull request #388 from lad1337/fix_getImages_with_api_error

Fix get images with api error
  • Loading branch information...
2 parents ca23a89 + 1d24166 commit ccf90aed726183a949880d7d8147b2639160ede2 @midgetspy committed May 6, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 sickbeard/webapi.py
View
@@ -104,6 +104,8 @@ def default(self, *args, **kwargs):
else:# if debug was not set we wrap the "call_dispatcher" in a try block to assure a json output
try:
outDict = _call_dispatcher(args, kwargs)
+ except cherrypy.HTTPRedirect: # seams like cherrypy uses exceptions for redirecting apparently this can happen when requesting images but it is ok so lets re raise it
+ raise
except Exception, e: # real internal error oohhh nooo :(
logger.log(u"API :: " + ex(e), logger.ERROR)
errorData = {"error_msg": ex(e),
@@ -1793,10 +1795,10 @@ def run(self):
# moved the logic check to the end in an attempt to eliminate empty directory being created from previous errors
showPath = ek.ek(os.path.join, self.location, helpers.sanitizeFileName(tvdbName))
-
+
# don't create show dir if config says not to
if sickbeard.ADD_SHOWS_WO_DIR:
- logger.log(u"Skipping initial creation of "+showPath+" due to config.ini setting")
+ logger.log(u"Skipping initial creation of " + showPath + " due to config.ini setting")
else:
dir_exists = helpers.makeDir(showPath)
if not dir_exists:

0 comments on commit ccf90ae

Please sign in to comment.