summaryrefslogtreecommitdiff
path: root/service/pixelated/maintenance.py
diff options
context:
space:
mode:
authorJefferson Stachelski <jstachel@thoughtworks.com>2015-04-28 16:54:39 -0300
committerJefferson Stachelski <jstachel@thoughtworks.com>2015-04-29 16:26:33 -0300
commitf83ef10a3c764d734166ed924cff4fb715537e93 (patch)
treec3127b10f3b08bf6f5eeb2f05d1d8aa0d5dd44b7 /service/pixelated/maintenance.py
parentb84432fc22063e5ce18c6e07d8e4daa89eb2d5c5 (diff)
#337 Refactored maintenance, renaming to make it more clear when read the code and deleted unsed variable
Diffstat (limited to 'service/pixelated/maintenance.py')
-rw-r--r--service/pixelated/maintenance.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/service/pixelated/maintenance.py b/service/pixelated/maintenance.py
index 0ec75ab6..909b2237 100644
--- a/service/pixelated/maintenance.py
+++ b/service/pixelated/maintenance.py
@@ -146,11 +146,11 @@ def load_mails(args, mail_paths):
print 'Loading mails from %s' % path
for root, dirs, files in os.walk(path):
mbx = account.getMailbox('INBOX')
- for f in files:
- with open(join(root, f), 'r') as fp:
- m = email.message_from_file(fp)
+ for file_name in files:
+ with open(join(root, file_name), 'r') as email_file:
+ m = email.message_from_file(email_file)
flags = ("\\RECENT",)
- r = yield mbx.addMessage(m.as_string(), flags=flags, notify_on_disk=False)
+ yield mbx.addMessage(m.as_string(), flags=flags, notify_on_disk=False)
print 'Added message %s' % m.get('subject')
print m.as_string()