Skip to content

Commit

Permalink
cleaner message counting on restore-mbox
Browse files Browse the repository at this point in the history
  • Loading branch information
jay0lee committed Jun 22, 2014
1 parent d0b251b commit 81893b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion gyb.py
Original file line number Diff line number Diff line change
Expand Up @@ -956,6 +956,7 @@ def main(argv):
mbox = mailbox.mbox(file_path)
mbox_count = len(mbox.items())
current = 0
print "\nRestoring from %s" % file_path
for message in mbox:
current += 1
message_marker = '%s-%s' % (file_path, current)
Expand Down Expand Up @@ -1020,7 +1021,7 @@ def main(argv):
flags_string = ' '.join(flags)
msg_account, internal_datetime = message.get_from().split(' ', 1)
internal_datetime_seconds = time.mktime(email.utils.parsedate(internal_datetime))
sys.stdout.write("restoring message %s of %s from %s" % (current, mbox_count, file_path))
sys.stdout.write(" message %s of %s" % (current, mbox_count))
sys.stdout.flush()
full_message = message.as_string()
while True:
Expand Down

0 comments on commit 81893b8

Please sign in to comment.