From a32bf4a47a55c6bfdf93c2c2920497f2cb675d61 Mon Sep 17 00:00:00 2001 From: Eric Callahan Date: Sat, 26 Feb 2022 07:17:57 -0500 Subject: [PATCH] file_manager: allow server to start with invalid paths Don't raise an exeption if the config or log paths are invalid, add warnings instead. This allows the user to see what is wrong and resolve this issue. Signed-off-by: Eric Callahan --- moonraker/components/file_manager/file_manager.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/moonraker/components/file_manager/file_manager.py b/moonraker/components/file_manager/file_manager.py index 41edd41..2ab35c5 100644 --- a/moonraker/components/file_manager/file_manager.py +++ b/moonraker/components/file_manager/file_manager.py @@ -101,19 +101,12 @@ class FileManager: # Register Klippy Configuration Path config_path = config.get('config_path', None) if config_path is not None: - ret = self.register_directory('config', config_path, - full_access=True) - if not ret: - raise config.error( - "Option 'config_path' is not a valid directory") + self.register_directory('config', config_path, full_access=True) # Register logs path log_path = config.get('log_path', None) if log_path is not None: - ret = self.register_directory('logs', log_path) - if not ret: - raise config.error( - "Option 'log_path' is not a valid directory") + self.register_directory('logs', log_path) # If gcode path is in the database, register it if gc_path: