1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Simplifying expressions

This commit is contained in:
Nils Vogels 2014-05-02 13:33:06 +02:00
parent dad75ae09b
commit 17171dba8b
5 changed files with 11 additions and 11 deletions

View File

@ -179,7 +179,7 @@ def change_VERSION_NOTIFY(version_notify):
sickbeard.VERSION_NOTIFY = version_notify
if version_notify == False:
if not version_notify:
sickbeard.NEWEST_VERSION_STRING = None
if oldSetting == False and version_notify == True:

View File

@ -146,7 +146,7 @@ def snatchEpisode(result, endStatus=SNATCHED):
logger.log(u"Unknown result type, unable to download it", logger.ERROR)
dlResult = False
if dlResult == False:
if not dlResult:
return False
if sickbeard.USE_FAILED_DOWNLOADS:

View File

@ -74,7 +74,7 @@ class BacklogSearcher:
else:
show_list = sickbeard.showList
if self.amActive == True:
if self.amActive:
logger.log(u"Backlog is still running, not starting it again", logger.DEBUG)
return

View File

@ -1314,14 +1314,14 @@ class TVEpisode(object):
pass
# if we tried loading it from NFO and didn't find the NFO, try the Indexers
if self.hasnfo == False:
if not self.hasnfo:
try:
result = self.loadFromIndexer(season, episode)
except exceptions.EpisodeDeletedException:
result = False
# if we failed SQL *and* NFO, Indexers then fail
if result == False:
if not result:
raise exceptions.EpisodeNotFoundException(
"Couldn't find episode " + str(season) + "x" + str(episode))
@ -2117,17 +2117,17 @@ class TVEpisode(object):
for cur_related_file in related_files:
cur_result = helpers.rename_ep_file(cur_related_file, absolute_proper_path,
absolute_current_path_no_ext_length)
if cur_result == False:
if not cur_result:
logger.log(str(self.indexerid) + u": Unable to rename file " + cur_related_file, logger.ERROR)
for cur_related_sub in related_subs:
cur_result = helpers.rename_ep_file(cur_related_sub, absolute_proper_subs_path,absolute_current_path_no_ext_length)
if cur_result == False:
if not cur_result:
logger.log(str(self.indexerid) + u": Unable to rename file " + cur_related_sub, logger.ERROR)
# save the ep
with self.lock:
if result != False:
if result:
self.location = absolute_proper_path + file_ext
for relEp in self.relatedEps:
relEp.location = absolute_proper_path + file_ext

View File

@ -193,7 +193,7 @@ class Api:
else:
del kwargs["apikey"]
if sickbeard.USE_API != True:
if not sickbeard.USE_API:
msg = u"API :: " + remoteIp + " - SB API Disabled. ACCESS DENIED"
return False, msg, args, kwargs
elif apiKey == realKey:
@ -1512,7 +1512,7 @@ class CMD_SickBeardPauseBacklog(ApiCall):
def run(self):
""" pause the backlog search """
if self.pause == True:
if self.pause:
sickbeard.searchQueueScheduler.action.pause_backlog() #@UndefinedVariable
return _responds(RESULT_SUCCESS, msg="Backlog paused")
else:
@ -2172,7 +2172,7 @@ class CMD_ShowPause(ApiCall):
if not showObj:
return _responds(RESULT_FAILURE, msg="Show not found")
if self.pause == True:
if self.pause:
showObj.paused = 1
return _responds(RESULT_SUCCESS, msg=str(showObj.name) + " has been paused")
else: