@@ -29,22 +29,23 @@ def _find_gcode_file(specified_path: pathlib.Path | None) -> pathlib.Path:
2929 g_code_file = specified_path
3030 elif specified_path is not None :
3131 custom_print (
32- f"❌ The specified G-code:\n { specified_path .resolve ()} \n is not valid.\n " "🛑 Exiting the program."
32+ f"❌ The specified G-code:\n { specified_path .resolve ()} \n is not valid.\n " "🛑 Exiting the program." ,
33+ lvl = 1 ,
3334 )
3435 exit ()
3536 else :
36- custom_print ("⚠️ No G-code file specified. Looking for a G-code file in the current directory... 👀" )
37+ custom_print ("⚠️ No G-code file specified. Looking for a G-code file in the current directory... 👀" , lvl = 1 )
3738 files_list = list (pathlib .Path .cwd ().glob ("*.gcode" ))
3839 if files_list .__len__ () == 0 :
39- custom_print ("❌ No G-code file found in the current directory.\n " "🛑 Exiting the program." )
40+ custom_print ("❌ No G-code file found in the current directory.\n " "🛑 Exiting the program." , lvl = 1 )
4041 exit ()
4142 elif files_list .__len__ () == 1 :
4243 g_code_file = files_list [0 ]
4344 else :
44- custom_print ("❌ Multiple G-code files found in the current directory:" )
45+ custom_print ("❌ Multiple G-code files found in the current directory:" , lvl = 1 )
4546 for file in files_list :
46- custom_print (f" - { file .resolve ()} " )
47- custom_print ("🛑 Exiting the program." )
47+ custom_print (f" - { file .resolve ()} " , lvl = 1 )
48+ custom_print ("🛑 Exiting the program." , lvl = 1 )
4849 exit ()
4950
5051 custom_print (f"✅ Using the G-code file:\n { g_code_file .resolve ()} " )
@@ -57,7 +58,8 @@ def _get_presets_file(presets_file: pathlib.Path | None) -> pathlib.Path:
5758 presets_file = importlib .resources .files ("pyGCodeDecode" ).joinpath ("data/default_printer_presets.yaml" )
5859 elif not presets_file .is_file ():
5960 custom_print (
60- f"❌ The specified presets file:\n { presets_file .resolve ()} \n is not valid.\n " "🛑 Exiting the program."
61+ f"❌ The specified presets file:\n { presets_file .resolve ()} \n is not valid.\n " "🛑 Exiting the program." ,
62+ lvl = 1 ,
6163 )
6264 exit ()
6365 else :
0 commit comments