File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/superannotate/lib/infrastructure Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -72,18 +72,17 @@ def init(self, config_path=None):
7272 if not config_path :
7373 config_path = constances .CONFIG_FILE_LOCATION
7474 config_path = Path (expanduser (config_path ))
75+ if str (config_path ) == constances .CONFIG_FILE_LOCATION :
76+ if not Path (self ._config_path ).is_file ():
77+ self .configs .insert (ConfigEntity ("main_endpoint" , constances .BACKEND_URL ))
78+ self .configs .insert (ConfigEntity ("token" , "" ))
79+ return
7580 if not config_path .is_file ():
7681 raise AppException (
7782 f"SuperAnnotate config file { str (config_path )} not found."
7883 f" Please provide correct config file location to sa.init(<path>) or use "
7984 f"CLI's superannotate init to generate default location config file."
8085 )
81- if str (config_path ) == constances .CONFIG_FILE_LOCATION :
82- if not Path (self ._config_path ).is_file ():
83- self .configs .insert (ConfigEntity ("main_endpoint" , constances .BACKEND_URL ))
84- self .configs .insert (ConfigEntity ("token" , "" ))
85- return
86-
8786 self ._config_path = config_path
8887 token , main_endpoint = (
8988 self .configs .get_one ("token" ),
You can’t perform that action at this time.
0 commit comments