Commits

Felix Friedrich committed 92e7409

organized imports an renamed a function

Comments (0)

Files changed (2)

mailbox_cleanup/mailbox_cleanup_cli.py

 # -*- coding: UTF-8 -*-
 
 import sys
+
 from mailbox_cleanup.util import download_attachments, commandline_arguments, accounts
 
+
 OK = 0
 ACCOUNT_DOES_NOT_EXIST = 5
 IMAP_ERROR = 6

mailbox_cleanup/util.py

 # -*- coding: utf-8 -*-
 
-import os
 import ConfigParser
-from imapclient import IMAPClient
 import email
 import getpass
+import os
 from clint.textui import progress
+from imapclient import IMAPClient
+
 
 config_filename = os.path.expanduser('~/.mailbox-cleanup.config')
 example_accountname = 'mail@example.com'
     config = ConfigParser.ConfigParser()
 
     if testmode(filename):
-        add_config_default_data(config)
+        add_default_data(config)
         config.write(filename)
     else:
         if config_file_not_exists(filename):
-            add_config_default_data(config)
+            add_default_data(config)
             config.write(filename)
 
         config.read(filename)
 def accounts():
     config = ConfigParser.ConfigParser()
     if config_file_not_exists(config_filename):
-        add_config_default_data(config)
+        add_default_data(config)
         config.write(open(config_filename, 'w'))
     config.read(config_filename)
     return config.sections()
 
 
-def add_config_default_data(config):
+def add_default_data(config):
     account = example_accountname
     config.add_section(account)
     config.set(account, 'host', example_host)