示例#1
0
文件: amt_init.py 项目: simpkins/amt
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,))
示例#2
0
文件: maildb.py 项目: simpkins/amt
    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()