def __init__(self, site, dbpath): """Create wiki instance.""" super().__init__(site) if not pathlib.Path(dbpath).exists(): raise FileNotFoundError(dbpath) self.dbpath = dbpath orm.connect(dbpath)
def __init__(self, dbpath, new_run): """Create an instance.""" if new_run: os.remove(dbpath) print('Found Duplicate DB: New Flag is On -- Deleted DB') orm.connect(dbpath) self.pool = concurrent.futures.ThreadPoolExecutor(max_workers=20)
def __init__(self, dbpath): """Create an instance.""" if pathlib.Path(dbpath).exists(): raise FileExistsError(dbpath) orm.connect(dbpath) self.pool = concurrent.futures.ThreadPoolExecutor(max_workers=20)