File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed
Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -2622,11 +2622,8 @@ def update_json(new_json_data):
26222622
26232623def read_json ():
26242624
2625- try :
2626- with open (_json_path , "r" ) as json_file :
2627- json_data = json .load (json_file )
2628- except FileNotFoundError : # TODO: should create this if not found
2629- sys .exit (f"config.json cannot be found at { _json_path } . \n Exiting..." )
2625+ with open (_json_path , "r" ) as json_file :
2626+ json_data = json .load (json_file )
26302627
26312628 return json_data
26322629
@@ -2820,6 +2817,21 @@ def parse_arguments(json_data):
28202817 return parser .parse_args ()
28212818
28222819def main ():
2820+ # json creation
2821+ if not os .path .exists (_json_path ):
2822+ os .makedirs ("~/.eukfinder" , exist_ok = True )
2823+
2824+ with open (_json_path , "w" ):
2825+ pass
2826+
2827+ update_json (
2828+ {
2829+ "Centrifuge" : "" ,
2830+ "plast_db" : "" ,
2831+ "plast_map" : ""
2832+ }
2833+ )
2834+
28232835 json_data = read_json ()
28242836 args = parse_arguments (json_data )
28252837
You can’t perform that action at this time.
0 commit comments