@@ -68,7 +68,6 @@ def __init__(self, args: Namespace) -> None:
6868 self .log .debug ('Received json config file path (%s)' , self .args .cfg )
6969 if not os .path .isfile (self .args .cfg ):
7070 self .log .critical ('Invalid json config file path supplied (%s)' , self .args .cfg )
71- sys .exit (1 )
7271
7372 __bar = bar_factory ('\u2501 ' , borders = (' ' , ' ' ), background = ' ' )
7473 __spinner = frame_spinner_factory ([colored (p , 'cyan' ) if supports_color else p for p in '⠋⠙⠹⠸⠼⠴⠦⠧⠇⠏' ])
@@ -144,7 +143,6 @@ def __get_json_config_path(self) -> str:
144143
145144 if len (found ) == 0 :
146145 self .log .critical ('No json config file found in file tree' )
147- sys .exit (1 )
148146 return found .pop ()
149147
150148 def __on_end (self , sig : int , _ : Any , / ) -> None :
@@ -207,14 +205,12 @@ def __load_points(self, cfg: Config) -> None:
207205
208206 self .log .critical ('Failed to parse line: %s (%s:%d)\n %s' , line , cfg .file_path ,
209207 len (self .points ) + int (cfg .skip_first_line ) - index , e )
210- sys .exit (1 )
211208
212209 except FileNotFoundError as e :
213210 self .log .error ('Skipping unknown file: %s' , e )
214211 return
215212 except Exception as e : # pylint: disable=broad-except
216213 self .log .critical ('Failed to read file: %s\n %s' , cfg .file_path , e )
217- sys .exit (1 )
218214 self .log .debug ('Loaded %s points from file: \u2026 /%s' ,
219215 format (len (self .points ) + int (cfg .skip_first_line ) - index , '_' ), basename )
220216
@@ -277,25 +273,21 @@ def __setup(self) -> None:
277273 self .log .critical (
278274 'Failed to parse json config file : '
279275 'maximum nesting level could be reached, please check your file\n %s' , e )
280- sys .exit (1 )
281276 if not raw_data :
282277 self .log .critical ('Failed to parse %s : empty file' , self .args .cfg )
283- sys .exit (1 )
284278 default : dict [str , Any ] = None
285279 configs : list [dict [str , Any ]] = None
286280 try :
287281 default = raw_data ['default' ]
288282 configs = raw_data ['configs' ]
289283 except KeyError as e :
290284 self .log .critical ('Failed to parse %s : %s' , self .args .cfg , e )
291- sys .exit (1 )
292285 cfgs : list [Config ] = []
293286 try :
294287 for cfg in configs :
295288 cfgs .append (Config .from_json (json = cfg , ** default ))
296289 except ValueError as e :
297290 self .log .critical ('Failed to parse config n°%d : %s' , len (cfgs ), e )
298- sys .exit (1 )
299291
300292 fset : list [int ] = None
301293 if self .args .only and any (map (lambda x : x > len (cfgs ), self .args .only )): # pylint: disable=bad-builtin
0 commit comments