diff --git a/mylar/PostProcessor.py b/mylar/PostProcessor.py index 096ef208..340dcfce 100755 --- a/mylar/PostProcessor.py +++ b/mylar/PostProcessor.py @@ -378,7 +378,7 @@ class PostProcessor(object): # if the NZBGet Directory option is enabled, let's use that folder name and append the jobname. if self.nzb_name == 'Manual Run': logger.fdebug('%s Manual Run Post-Processing enabled.' % module) - elif all([mylar.CONFIG.NZBGET_DIRECTORY is not None, mylar.CONFIG.NZBGET_DIRECTORY is not 'None']): + elif all([mylar.CONFIG.NZBGET_DIRECTORY is not None, mylar.CONFIG.NZBGET_DIRECTORY != 'None']): logger.fdebug('%s NZB name as passed from NZBGet: %s' % (module, self.nzb_name)) self.nzb_folder = os.path.join(mylar.CONFIG.NZBGET_DIRECTORY, self.nzb_name) #.encode(mylar.SYS_ENCODING) logger.fdebug('%s NZBGET Download folder option enabled. Directory set to : %s' % (module, self.nzb_folder)) diff --git a/mylar/filers.py b/mylar/filers.py index c977e16d..a6b6d2e7 100644 --- a/mylar/filers.py +++ b/mylar/filers.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of Mylar. @@ -474,7 +473,7 @@ class FileHandlers(object): #if it's an annual, but $annual isn't specified in file_format, we need to #force it in there, by default in the format of $Annual $Issue #prettycomiss = "Annual " + str(prettycomiss) - logger.fdebug('[%s][ANNUALS-OFF][ANNUAL IN SERIES][NO ANNUAL FORMAT] prettycomiss: %s' (series, prettycomiss)) + logger.fdebug('[%s][ANNUALS-OFF][ANNUAL IN SERIES][NO ANNUAL FORMAT] prettycomiss: %s' % (series, prettycomiss)) else: #because it exists within title, strip it then use formatting tag for placement of wording. chunk_f_f = re.sub('\$Annual', '', chunk_file_format) diff --git a/mylar/helpers.py b/mylar/helpers.py index 83688d53..dfb04f7d 100755 --- a/mylar/helpers.py +++ b/mylar/helpers.py @@ -609,7 +609,7 @@ def rename_param(comicid, comicname, issue, ofilename, comicyear=None, issueid=N #if it's an annual, but $annual isn't specified in file_format, we need to #force it in there, by default in the format of $Annual $Issue #prettycomiss = "Annual " + str(prettycomiss) - logger.fdebug('[%s][ANNUALS-OFF][ANNUAL IN SERIES][NO ANNUAL FORMAT] prettycomiss: %s' (series, prettycomiss)) + logger.fdebug('[%s][ANNUALS-OFF][ANNUAL IN SERIES][NO ANNUAL FORMAT] prettycomiss: %s' % (series, prettycomiss)) else: #because it exists within title, strip it then use formatting tag for placement of wording. chunk_f_f = re.sub('\$Annual', '', chunk_file_format) diff --git a/mylar/librarysync.py b/mylar/librarysync.py index dd35df39..d49c6761 100644 --- a/mylar/librarysync.py +++ b/mylar/librarysync.py @@ -198,7 +198,7 @@ def libraryScan(dir=None, append=False, ComicID=None, ComicName=None, cron=None, alt_chk = "no" # alt-checker flag (default to no) # account for alternate names as well - if watch['AlternateSearch'] is not None and watch['AlternateSearch'] is not 'None': + if watch['AlternateSearch'] is not None and watch['AlternateSearch'] != 'None': altcomic = re.sub('[\_\#\,\/\:\;\.\-\!\$\%\&\+\'\?\@]', '', watch['AlternateSearch']).encode('utf-8').strip() #altcomic = re.sub('\s+', ' ', str(altcomic)).strip() AltName.append(altcomic) diff --git a/mylar/notifiers.py b/mylar/notifiers.py index 28dbcd7c..4e22b516 100644 --- a/mylar/notifiers.py +++ b/mylar/notifiers.py @@ -388,12 +388,12 @@ class EMAIL: msg['Message-ID'] = make_msgid('mylar') msg.attach(MIMEText(message, 'plain')) - if self.emailenc is 1: + if self.emailenc == 1: sock = smtplib.SMTP_SSL(self.emailsvr, str(self.emailport)) else: sock = smtplib.SMTP(self.emailsvr, str(self.emailport)) - if self.emailenc is 2: + if self.emailenc == 2: sock.starttls() if self.emailuser or self.emailpass: diff --git a/mylar/search.py b/mylar/search.py index 4a9803f9..c175a83d 100755 --- a/mylar/search.py +++ b/mylar/search.py @@ -1207,7 +1207,7 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa logger.fdebug('%s Fuzzy logic\'d the Year and year still did not match.' % comyear) #let's do this here and save a few extra loops ;) #fix for issue dates between Nov-Dec/Jan - if IssDateFix != "no" and UseFuzzy is not "2": + if IssDateFix != "no" and UseFuzzy != "2": if IssDateFix == "01" or IssDateFix == "02" or IssDateFix == "03": ComicYearFix = int(ComicYear) - 1 if str(ComicYearFix) in result_comyear: @@ -1237,7 +1237,7 @@ def NZB_SEARCH(ComicName, IssueNumber, ComicYear, SeriesYear, Publisher, IssueDa logger.fdebug("vers4year: %s" % vers4year) logger.fdebug("vers4vol: %s" % vers4vol) - if vers4year is not "no" or vers4vol is not "no": + if vers4year != "no" or vers4vol != "no": #if the volume is None, assume it's a V1 to increase % hits if ComVersChk == 0: D_ComicVersion = 1 @@ -2215,7 +2215,7 @@ def searcher(nzbprov, nzbname, comicinfo, link, IssueID, ComicID, tmpprov, direc tmp_line = down_url tmp_url = down_url tmp_url_st = tmp_url.find('apikey=') - if tmp_url_st is -1: + if tmp_url_st == -1: tmp_url_st = tmp_url.find('r=') tmp_line = tmp_url[:tmp_url_st+2] else: diff --git a/mylar/webserve.py b/mylar/webserve.py index 4519e609..18050d4a 100644 --- a/mylar/webserve.py +++ b/mylar/webserve.py @@ -4869,7 +4869,7 @@ class WebInterface(object): CCONTCOUNT = 0 cti = helpers.havetotals() for cchk in cti: - if cchk['recentstatus'] is 'Continuing': + if cchk['recentstatus'] == 'Continuing': CCONTCOUNT += 1 comicinfo = {"COUNT_COMICS": COUNT_COMICS, "COUNT_HAVES": COUNT_HAVES,