diff --git a/helpdesk/akismet.py b/helpdesk/akismet.py index 31564b92..e49d3aa9 100644 --- a/helpdesk/akismet.py +++ b/helpdesk/akismet.py @@ -157,8 +157,8 @@ class Akismet(object): ``Akismet`` instance. """ if key is None and isfile('apikey.txt'): - the_file = [l.strip() for l in open('apikey.txt').readlines() - if l.strip() and not l.strip().startswith('#')] + the_file = [line.strip() for line in open('apikey.txt').readlines() + if line.strip() and not line.strip().startswith('#')] try: self.key = the_file[0] self.blog_url = the_file[1] diff --git a/helpdesk/management/commands/get_email.py b/helpdesk/management/commands/get_email.py index 053fceee..630f8ecf 100755 --- a/helpdesk/management/commands/get_email.py +++ b/helpdesk/management/commands/get_email.py @@ -101,7 +101,7 @@ def process_email(quiet=False): if quiet: logger.propagate = False # do not propagate to root logger that would log to console logdir = q.logging_dir or '/var/log/helpdesk/' - + try: handler = logging.FileHandler(join(logdir, q.slug + '_get_email.log')) logger.addHandler(handler)