mirror of https://github.com/evilhero/mylar
FIX: fixed syntax warnings on startup
This commit is contained in:
parent
95527cb27b
commit
cddb7e0d8b
|
@ -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 the NZBGet Directory option is enabled, let's use that folder name and append the jobname.
|
||||||
if self.nzb_name == 'Manual Run':
|
if self.nzb_name == 'Manual Run':
|
||||||
logger.fdebug('%s Manual Run Post-Processing enabled.' % module)
|
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))
|
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)
|
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))
|
logger.fdebug('%s NZBGET Download folder option enabled. Directory set to : %s' % (module, self.nzb_folder))
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
#!/usr/bin/env python
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
# This file is part of Mylar.
|
# 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
|
#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
|
#force it in there, by default in the format of $Annual $Issue
|
||||||
#prettycomiss = "Annual " + str(prettycomiss)
|
#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:
|
else:
|
||||||
#because it exists within title, strip it then use formatting tag for placement of wording.
|
#because it exists within title, strip it then use formatting tag for placement of wording.
|
||||||
chunk_f_f = re.sub('\$Annual', '', chunk_file_format)
|
chunk_f_f = re.sub('\$Annual', '', chunk_file_format)
|
||||||
|
|
|
@ -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
|
#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
|
#force it in there, by default in the format of $Annual $Issue
|
||||||
#prettycomiss = "Annual " + str(prettycomiss)
|
#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:
|
else:
|
||||||
#because it exists within title, strip it then use formatting tag for placement of wording.
|
#because it exists within title, strip it then use formatting tag for placement of wording.
|
||||||
chunk_f_f = re.sub('\$Annual', '', chunk_file_format)
|
chunk_f_f = re.sub('\$Annual', '', chunk_file_format)
|
||||||
|
|
|
@ -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)
|
alt_chk = "no" # alt-checker flag (default to no)
|
||||||
|
|
||||||
# account for alternate names as well
|
# 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('[\_\#\,\/\:\;\.\-\!\$\%\&\+\'\?\@]', '', watch['AlternateSearch']).encode('utf-8').strip()
|
||||||
#altcomic = re.sub('\s+', ' ', str(altcomic)).strip()
|
#altcomic = re.sub('\s+', ' ', str(altcomic)).strip()
|
||||||
AltName.append(altcomic)
|
AltName.append(altcomic)
|
||||||
|
|
|
@ -388,12 +388,12 @@ class EMAIL:
|
||||||
msg['Message-ID'] = make_msgid('mylar')
|
msg['Message-ID'] = make_msgid('mylar')
|
||||||
msg.attach(MIMEText(message, 'plain'))
|
msg.attach(MIMEText(message, 'plain'))
|
||||||
|
|
||||||
if self.emailenc is 1:
|
if self.emailenc == 1:
|
||||||
sock = smtplib.SMTP_SSL(self.emailsvr, str(self.emailport))
|
sock = smtplib.SMTP_SSL(self.emailsvr, str(self.emailport))
|
||||||
else:
|
else:
|
||||||
sock = smtplib.SMTP(self.emailsvr, str(self.emailport))
|
sock = smtplib.SMTP(self.emailsvr, str(self.emailport))
|
||||||
|
|
||||||
if self.emailenc is 2:
|
if self.emailenc == 2:
|
||||||
sock.starttls()
|
sock.starttls()
|
||||||
|
|
||||||
if self.emailuser or self.emailpass:
|
if self.emailuser or self.emailpass:
|
||||||
|
|
|
@ -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)
|
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 ;)
|
#let's do this here and save a few extra loops ;)
|
||||||
#fix for issue dates between Nov-Dec/Jan
|
#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":
|
if IssDateFix == "01" or IssDateFix == "02" or IssDateFix == "03":
|
||||||
ComicYearFix = int(ComicYear) - 1
|
ComicYearFix = int(ComicYear) - 1
|
||||||
if str(ComicYearFix) in result_comyear:
|
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("vers4year: %s" % vers4year)
|
||||||
logger.fdebug("vers4vol: %s" % vers4vol)
|
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 the volume is None, assume it's a V1 to increase % hits
|
||||||
if ComVersChk == 0:
|
if ComVersChk == 0:
|
||||||
D_ComicVersion = 1
|
D_ComicVersion = 1
|
||||||
|
@ -2215,7 +2215,7 @@ def searcher(nzbprov, nzbname, comicinfo, link, IssueID, ComicID, tmpprov, direc
|
||||||
tmp_line = down_url
|
tmp_line = down_url
|
||||||
tmp_url = down_url
|
tmp_url = down_url
|
||||||
tmp_url_st = tmp_url.find('apikey=')
|
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_url_st = tmp_url.find('r=')
|
||||||
tmp_line = tmp_url[:tmp_url_st+2]
|
tmp_line = tmp_url[:tmp_url_st+2]
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -4869,7 +4869,7 @@ class WebInterface(object):
|
||||||
CCONTCOUNT = 0
|
CCONTCOUNT = 0
|
||||||
cti = helpers.havetotals()
|
cti = helpers.havetotals()
|
||||||
for cchk in cti:
|
for cchk in cti:
|
||||||
if cchk['recentstatus'] is 'Continuing':
|
if cchk['recentstatus'] == 'Continuing':
|
||||||
CCONTCOUNT += 1
|
CCONTCOUNT += 1
|
||||||
comicinfo = {"COUNT_COMICS": COUNT_COMICS,
|
comicinfo = {"COUNT_COMICS": COUNT_COMICS,
|
||||||
"COUNT_HAVES": COUNT_HAVES,
|
"COUNT_HAVES": COUNT_HAVES,
|
||||||
|
|
Loading…
Reference in New Issue