-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
35 lines (24 loc) · 751 Bytes
/
main.py
File metadata and controls
35 lines (24 loc) · 751 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import sys
from support.tools.utils import logo, erase_db
from support.manage_key import get_key_path
from support import setup
import os
import argparse
from support.menu import unlock
def initialize(erase=False):
""" Initializes the program """
logo()
key_path = get_key_path()
if erase:
erase_db()
sys.exit()
if not os.path.isfile(get_key_path()):
setup.initialize()
unlock()
def main():
parser = argparse.ArgumentParser()
parser.add_argument('-e', "--erase_db", help="Erase the database and Reset Master Password", action='store_true')
args = parser.parse_args()
initialize(erase=args.erase_db)
if __name__ == '__main__':
main()