Onionr/onionr/utils/createdirs.py
2019-07-26 21:42:55 -05:00

16 lines
437 B
Python

import os
from . import identifyhome
import dbcreator, filepaths
home = identifyhome.identify_home()
def create_dirs():
gen_dirs = [home, filepaths.block_data_location, filepaths.contacts_location, filepaths.export_location]
for path in gen_dirs:
if not os.path.exists(path):
os.mkdir(path)
for db in dbcreator.create_funcs:
try:
db()
except FileExistsError:
pass