Conditional check bugfixes

This commit is contained in:
echel0n 2014-04-02 07:23:17 -07:00
parent bd84656517
commit e171aa1c10
7 changed files with 11 additions and 12 deletions

View File

@ -129,7 +129,7 @@ class CacheHandler(urllib2.BaseHandler):
def default_open(self, request):
"""Handles GET requests, if the response is cached it returns it
"""
if request.get_method() is not "GET":
if request.get_method() != "GET":
return None # let the next handler try to handle the request
if exists_in_cache(

View File

@ -433,7 +433,7 @@ class TVRage:
elm.tag = robj.sub(lambda m: reDict[m.group(0)], elm.tag)
if elm.tag in 'firstaired' and elm.text:
if elm.text is "0000-00-00":
if elm.text == "0000-00-00":
elm.text = str(dt.date.fromordinal(1))
try:
#month = strptime(match.group('air_month')[:3],'%b').tm_mon

View File

@ -129,7 +129,7 @@ class CacheHandler(urllib2.BaseHandler):
def default_open(self, request):
"""Handles GET requests, if the response is cached it returns it
"""
if request.get_method() is not "GET":
if request.get_method() != "GET":
return None # let the next handler try to handle the request
if exists_in_cache(

View File

@ -29,10 +29,10 @@ import urllib
from threading import Lock
# apparently py2exe won't build these unless they're imported somewhere
from sickbeard import providers, metadata
from sickbeard import providers, metadata, config
from providers import ezrss, tvtorrents, btn, newznab, womble, thepiratebay, torrentleech, kat, publichd, iptorrents, \
omgwtfnzbs, scc, hdtorrents, torrentday, hdbits, nextgen
from sickbeard.config import CheckSection, check_setting_int, check_setting_str, ConfigMigrator
from sickbeard.config import CheckSection, check_setting_int, check_setting_str, ConfigMigrator, naming_ep_type
from sickbeard import searchCurrent, searchBacklog, showUpdater, versionChecker, properFinder, autoPostProcesser, \
subtitles, traktWatchListChecker
from sickbeard import helpers, db, exceptions, show_queue, search_queue, scheduler, show_name_helpers

View File

@ -203,9 +203,9 @@ class BTNProvider(generic.TorrentProvider):
current_params = {}
if show.indexer is 1:
if show.indexer == 1:
current_params['tvdb'] = show.indexerid
elif show.indexer is 2:
elif show.indexer == 2:
current_params['tvrage'] = show.indexerid
else:
# Search by name if we don't have tvdb or tvrage id

View File

@ -2413,7 +2413,7 @@ class CMD_ShowStats(ApiCall):
episodes_stats["downloaded"] = {}
# truning codes into strings
for statusCode in episode_qualities_counts_download:
if statusCode is "total":
if statusCode == "total":
episodes_stats["downloaded"]["total"] = episode_qualities_counts_download[statusCode]
continue
status, quality = Quality.splitCompositeStatus(int(statusCode))
@ -2424,7 +2424,7 @@ class CMD_ShowStats(ApiCall):
# truning codes into strings
# and combining proper and normal
for statusCode in episode_qualities_counts_snatch:
if statusCode is "total":
if statusCode == "total":
episodes_stats["snatched"]["total"] = episode_qualities_counts_snatch[statusCode]
continue
status, quality = Quality.splitCompositeStatus(int(statusCode))
@ -2436,7 +2436,7 @@ class CMD_ShowStats(ApiCall):
#episodes_stats["total"] = {}
for statusCode in episode_status_counts_total:
if statusCode is "total":
if statusCode == "total":
episodes_stats["total"] = episode_status_counts_total[statusCode]
continue
status, quality = Quality.splitCompositeStatus(int(statusCode))

View File

@ -1904,8 +1904,7 @@ class HomePostProcess:
return _munge(t)
@cherrypy.expose
def processEpisode(self, dir=None, nzbName=None, jobName=None, quiet=None, process_method=None,
force=None, is_priority=None, failed="0", type="auto"):
def processEpisode(self, dir=None, nzbName=None, jobName=None, quiet=None, process_method=None, force=None, is_priority=None, failed="0", type="auto"):
if failed == "0":
failed = False