Onionr/onionr/utils/createdirs.py

16 lines
400 B
Python
Raw Normal View History

2019-07-20 06:02:30 +00:00
import os
2019-07-18 17:40:48 +00:00
from . import identifyhome
import dbcreator, filepaths
home = identifyhome.identify_home()
2019-07-20 06:02:30 +00:00
def create_dirs():
if not os.path.exists(home):
os.mkdir(home)
if not os.path.exists(filepaths.block_data_location):
os.mkdir(filepaths.block_data_location)
2019-07-18 17:40:48 +00:00
2019-07-20 06:02:30 +00:00
for db in dbcreator.create_funcs:
try:
db()
except FileExistsError:
pass