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 <arksine.code@gmail.com>
This commit is contained in:
Eric Callahan 2022-02-26 07:17:57 -05:00
parent 3a384e62dd
commit a32bf4a47a
No known key found for this signature in database
GPG Key ID: 7027245FBBDDF59A
1 changed files with 2 additions and 9 deletions

View File

@ -101,19 +101,12 @@ class FileManager:
# Register Klippy Configuration Path # Register Klippy Configuration Path
config_path = config.get('config_path', None) config_path = config.get('config_path', None)
if config_path is not None: if config_path is not None:
ret = self.register_directory('config', config_path, self.register_directory('config', config_path, full_access=True)
full_access=True)
if not ret:
raise config.error(
"Option 'config_path' is not a valid directory")
# Register logs path # Register logs path
log_path = config.get('log_path', None) log_path = config.get('log_path', None)
if log_path is not None: if log_path is not None:
ret = self.register_directory('logs', log_path) self.register_directory('logs', log_path)
if not ret:
raise config.error(
"Option 'log_path' is not a valid directory")
# If gcode path is in the database, register it # If gcode path is in the database, register it
if gc_path: if gc_path: