file_manager: add option to opt out of klipper check
Some installations do not have Klipper's configuration in the data path's "config" folder. Provide a way to opt out of this check. Signed-off-by: Eric Callahan <arksine.code@gmail.com>
This commit is contained in:
parent
6d8cb762ff
commit
3b53d9532d
|
@ -104,6 +104,7 @@ class FileManager:
|
|||
self.scheduled_notifications: Dict[str, asyncio.TimerHandle] = {}
|
||||
self.fixed_path_args: Dict[str, Any] = {}
|
||||
self.queue_gcodes: bool = config.getboolean('queue_gcode_uploads', False)
|
||||
self.check_klipper_path = config.getboolean("check_klipper_config_path", True)
|
||||
|
||||
# Register file management endpoints
|
||||
self.server.register_endpoint(
|
||||
|
@ -195,6 +196,7 @@ class FileManager:
|
|||
"klippy.log", log_path, force=True)
|
||||
|
||||
# Validate config file
|
||||
if self.check_klipper_path:
|
||||
cfg_file: Optional[str] = paths.get("config_file")
|
||||
cfg_parent = self.file_paths.get("config")
|
||||
if cfg_file is not None and cfg_parent is not None:
|
||||
|
|
Loading…
Reference in New Issue