diff options
Diffstat (limited to 'src/leap')
-rw-r--r-- | src/leap/bitmask/app.py | 2 | ||||
-rw-r--r-- | src/leap/bitmask/services/mail/plumber.py (renamed from src/leap/bitmask/services/mail/repair.py) | 17 | ||||
-rw-r--r-- | src/leap/bitmask/util/leap_argparse.py | 5 |
3 files changed, 17 insertions, 7 deletions
diff --git a/src/leap/bitmask/app.py b/src/leap/bitmask/app.py index e8423fd5..12d1dadd 100644 --- a/src/leap/bitmask/app.py +++ b/src/leap/bitmask/app.py @@ -54,7 +54,7 @@ from leap.bitmask.util import log_silencer from leap.bitmask.util.leap_log_handler import LeapLogHandler from leap.bitmask.util.streamtologger import StreamToLogger from leap.bitmask.platform_init import IS_WIN -from leap.bitmask.services.mail.repair import repair_account +from leap.bitmask.services.mail.plumber import repair_account from leap.common.events import server as event_server from leap.mail import __version__ as MAIL_VERSION diff --git a/src/leap/bitmask/services/mail/repair.py b/src/leap/bitmask/services/mail/plumber.py index e921e207..4ecbc361 100644 --- a/src/leap/bitmask/services/mail/repair.py +++ b/src/leap/bitmask/services/mail/plumber.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# repair.py -# Copyright (C) 2013 LEAP +# plumber.py +# Copyright (C) 2013, 2014 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. """ -Utils for repairing mailbox indexes. +Utils for manipulating local mailboxes. """ import logging import getpass @@ -217,7 +217,12 @@ if __name__ == "__main__": logging.basicConfig() - if len(sys.argv) != 2: - print "Usage: repair <username>" + if len(sys.argv) != 3: + print "Usage: plumber [repair|import] <username>" sys.exit(1) - repair_account(sys.argv[1]) + + # this would be better with a dict if it grows + if sys.argv[1] == "repair": + repair_account(sys.argv[2]) + if sys.argv[1] == "import": + print "Not implemented yet." diff --git a/src/leap/bitmask/util/leap_argparse.py b/src/leap/bitmask/util/leap_argparse.py index fb92f141..dd0f40f7 100644 --- a/src/leap/bitmask/util/leap_argparse.py +++ b/src/leap/bitmask/util/leap_argparse.py @@ -75,6 +75,11 @@ Launches the Bitmask client.""", epilog=epilog) help='Repair mailboxes for a given account. ' 'Use when upgrading versions after a schema ' 'change.') + parser.add_argument('--import-maildir', metavar="/path/to/Maildir", + nargs='?', + action="store", dest="maildir", + help='Import the given maildir. Use with the --mdir ' + 'flag to import to folders other than INBOX.') if not IS_RELEASE_VERSION: help_text = ("Bypasses the certificate check during provider " |