|
|
|
@ -74,39 +74,38 @@ EINTR = 4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
|
from optparse import OptionParser
|
|
|
|
|
import argparse
|
|
|
|
|
|
|
|
|
|
optParser = OptionParser()
|
|
|
|
|
optParser.description = __doc__
|
|
|
|
|
optParser.add_option("-c", "--clean", action="store_true", dest="clean",
|
|
|
|
|
argparser = argparse.ArgumentParser(description= __doc__)
|
|
|
|
|
argparser.add_argument("-c", "--clean", action="store_true", dest="clean",
|
|
|
|
|
help="remove all generated files")
|
|
|
|
|
optParser.add_option("-b", "--backup", action="store_true", dest="backup",
|
|
|
|
|
argparser.add_argument("-b", "--backup", action="store_true", dest="backup",
|
|
|
|
|
help="make a backup of all generated files (old backup will be overwritten)")
|
|
|
|
|
optParser.add_option("-r", "--restore", action="store_true", dest="restore",
|
|
|
|
|
argparser.add_argument("-r", "--restore", action="store_true", dest="restore",
|
|
|
|
|
help="restore generated files from backup")
|
|
|
|
|
optParser.add_option("-C", "--clean-all", action="store_true", dest="cleanall",
|
|
|
|
|
argparser.add_argument("-C", "--clean-all", action="store_true", dest="cleanall",
|
|
|
|
|
help="remove all generated files including backup files")
|
|
|
|
|
optParser.add_option("-s", "--setup", action="store_true", dest="setup_only",
|
|
|
|
|
argparser.add_argument("-s", "--setup", action="store_true", dest="setup_only",
|
|
|
|
|
help="setup environment, then stop")
|
|
|
|
|
optParser.add_option("-p", "--print", action="store_true", dest="print",
|
|
|
|
|
argparser.add_argument("-p", "--print", action="store_true", dest="print",
|
|
|
|
|
help="print sync message trace in inbox")
|
|
|
|
|
optParser.add_option("-n", "--noend", action="store_true", dest="noend",
|
|
|
|
|
argparser.add_argument("-n", "--noend", action="store_true", dest="noend",
|
|
|
|
|
help="do not end")
|
|
|
|
|
optParser.add_option("-E", "--end-on", dest="notifications",
|
|
|
|
|
argparser.add_argument("-E", "--end-on", dest="notifications",
|
|
|
|
|
help="end test on these notifications")
|
|
|
|
|
optParser.add_option("-3", "--third-device", action="store_true", dest="third",
|
|
|
|
|
argparser.add_argument("-3", "--third-device", action="store_true", dest="third",
|
|
|
|
|
help="start Pad as third device")
|
|
|
|
|
optParser.add_option("-j", "--multi-threaded", action="store_true",
|
|
|
|
|
argparser.add_argument("-j", "--multi-threaded", action="store_true",
|
|
|
|
|
dest="multithreaded",
|
|
|
|
|
help="use multithreaded instead of single threaded implementation")
|
|
|
|
|
optParser.add_option("-i", "--imap", action="store_true",
|
|
|
|
|
argparser.add_argument("-i", "--imap", action="store_true",
|
|
|
|
|
dest="imap",
|
|
|
|
|
help="use imap instead of minimail")
|
|
|
|
|
optParser.add_option("-A", "--add-account-after-sync", action="store_true",
|
|
|
|
|
argparser.add_argument("-A", "--add-account-after-sync", action="store_true",
|
|
|
|
|
dest="add_account",
|
|
|
|
|
help="after sync add an account")
|
|
|
|
|
|
|
|
|
|
options, args = optParser.parse_args()
|
|
|
|
|
options = argparser.parse_args()
|
|
|
|
|
|
|
|
|
|
if options.imap:
|
|
|
|
|
import miniimap
|
|
|
|
|