def main(): ap = argparse.ArgumentParser() ap.add_argument('-m', '--maildb', metavar='PATH', help='The path where the new MailDB should be created') args = ap.parse_args() if not args.maildb: args.maildb = amt.config.default_maildb_path() print('Initializing maildb at %s...' % (args.maildb,)) start = time.time() MailDB.create_db(args.maildb) end = time.time() print('Initialized maildb in %.2f seconds' % (end - start,))
def setUpClass(cls): cls.tmpdir = None cls.tmpdir = tempfile.TemporaryDirectory() cls.dbdir = os.path.join(cls.tmpdir.name, 'maildb') cls.db = MailDB.create_db(cls.dbdir) cls.known_tuids = set()