Fix pycodestyle warnings

This commit is contained in:
Garret Wassermann 2020-07-20 08:10:10 -04:00
parent 46a5982184
commit fcde14b82c
2 changed files with 3 additions and 3 deletions

View File

@ -157,8 +157,8 @@ class Akismet(object):
``Akismet`` instance. ``Akismet`` instance.
""" """
if key is None and isfile('apikey.txt'): if key is None and isfile('apikey.txt'):
the_file = [l.strip() for l in open('apikey.txt').readlines() the_file = [line.strip() for line in open('apikey.txt').readlines()
if l.strip() and not l.strip().startswith('#')] if line.strip() and not line.strip().startswith('#')]
try: try:
self.key = the_file[0] self.key = the_file[0]
self.blog_url = the_file[1] self.blog_url = the_file[1]

View File

@ -101,7 +101,7 @@ def process_email(quiet=False):
if quiet: if quiet:
logger.propagate = False # do not propagate to root logger that would log to console logger.propagate = False # do not propagate to root logger that would log to console
logdir = q.logging_dir or '/var/log/helpdesk/' logdir = q.logging_dir or '/var/log/helpdesk/'
try: try:
handler = logging.FileHandler(join(logdir, q.slug + '_get_email.log')) handler = logging.FileHandler(join(logdir, q.slug + '_get_email.log'))
logger.addHandler(handler) logger.addHandler(handler)