Skip to content

Commit

Permalink
py3k: turn unicode literals into strings
Browse files Browse the repository at this point in the history
  • Loading branch information
Justus Winter committed Apr 16, 2012
1 parent 20de1b5 commit 12d0cfd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions afew/MailMover.py
Expand Up @@ -100,7 +100,7 @@ def __log_move_action(self, message, source, destination, dry_run):
level = logging.INFO
prefix = 'I would move mail'
logging.log(level, prefix)
logging.log(level, u" {}".format(get_message_summary(message)))
logging.log(level, u"from '{}' to '{}'".format(source, destination))
logging.log(level, " {}".format(get_message_summary(message)))
logging.log(level, "from '{}' to '{}'".format(source, destination))
#logging.debug("rule: '{}' in [{}]".format(tag, message.get_tags()))

4 changes: 2 additions & 2 deletions afew/utils.py
Expand Up @@ -121,8 +121,8 @@ def get_message_summary(message):
when = datetime.fromtimestamp(float(message.get_date()))
sender = get_sender(message)
subject = message.get_header('Subject')
return u'[{date}] {sender} | {subject}'.format(date=when, sender=sender,
subject=subject)
return '[{date}] {sender} | {subject}'.format(date=when, sender=sender,
subject=subject)

def get_sender(message):
sender = message.get_header('From')
Expand Down

0 comments on commit 12d0cfd

Please sign in to comment.