mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
PEP8 changes for rss feed cache code
This commit is contained in:
parent
571e7c7d61
commit
45fc163434
2 changed files with 10 additions and 12 deletions
|
@ -40,17 +40,17 @@ class RSSFeeds:
|
|||
fc = cache.Cache(fs)
|
||||
feed = fc.fetch(url, False, False, request_headers)
|
||||
|
||||
if not feed or not feed.entries:
|
||||
logger.log(u"RSS error loading url: " + url, logger.DEBUG)
|
||||
return
|
||||
elif 'error' in feed.feed:
|
||||
err_code = feed.feed['error']['code']
|
||||
err_desc = feed.feed['error']['description']
|
||||
if feed:
|
||||
if 'entries' in feed:
|
||||
return feed
|
||||
elif 'error' in feed.feed:
|
||||
err_code = feed.feed['error']['code']
|
||||
err_desc = feed.feed['error']['description']
|
||||
|
||||
logger.log(
|
||||
u"RSS ERROR:[%s] CODE:[%s]" % (err_desc, err_code), logger.DEBUG)
|
||||
return
|
||||
logger.log(
|
||||
u"RSS ERROR:[%s] CODE:[%s]" % (err_desc, err_code), logger.DEBUG)
|
||||
else:
|
||||
return feed
|
||||
logger.log(u"RSS error loading url: " + url, logger.DEBUG)
|
||||
|
||||
except Exception as e:
|
||||
logger.log(u"RSS error: " + ex(e), logger.DEBUG)
|
|
@ -220,8 +220,6 @@ class TVCache():
|
|||
def shouldClearCache(self):
|
||||
# if daily search hasn't used our previous results yet then don't clear the cache
|
||||
if self.lastUpdate > self.lastSearch:
|
||||
logger.log(
|
||||
u"Daily search has not yet used our last cache results, not clearing cache ...", logger.DEBUG)
|
||||
return False
|
||||
|
||||
return True
|
||||
|
|
Loading…
Reference in a new issue