This repository was archived by the owner on Dec 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change 138138 logger .error ("I'm sorry {}, I'm afraid I can't let you do that" .format (getpass .getuser ()))
139139 sys .exit (1 )
140140
141+ if not os .path .exists ('data/cme.db' ):
142+ logger .error ('Could not find CME database, did you run the setup_database.py script?' )
143+ sys .exit (1 )
144+
141145if not args .server_port :
142146 args .server_port = server_port_dict [args .server ]
143147
144- try :
145- # set the database connection to autocommit w/ isolation level
146- db_connection = sqlite3 .connect ('data/cme.db' , check_same_thread = False )
147- db_connection .text_factory = str
148- db_connection .isolation_level = None
149- db = CMEDatabase (db_connection )
150- except Exception as e :
151- logger .error ("Could not connect to CME database: {}" .format (e ))
152- sys .exit (1 )
148+ # set the database connection to autocommit w/ isolation level
149+ db_connection = sqlite3 .connect ('data/cme.db' , check_same_thread = False )
150+ db_connection .text_factory = str
151+ db_connection .isolation_level = None
152+ db = CMEDatabase (db_connection )
153153
154154if args .cred_id :
155155 try :
You can’t perform that action at this time.
0 commit comments