mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-11-30 13:05:08 +00:00
fix(serve): reject a config reload whose validation exits instead of stopping the server
This commit is contained in:
@@ -256,8 +256,8 @@ def reload_config(app: web.Application, *, no_key: bool, serve_widevine: bool, s
|
||||
fresh = Config.from_yaml(config_module.config_path)
|
||||
serve = fresh.serve
|
||||
api_secret = _prepare_serve(serve, no_key, fresh)
|
||||
except Exception as e:
|
||||
log.error(f"Config reload rejected, keeping the running config: {e}")
|
||||
except (Exception, SystemExit) as e:
|
||||
log.error(f"Config reload rejected, keeping the running config: {str(e).removeprefix('ERROR: ')}")
|
||||
return False
|
||||
|
||||
changed = [k for k in RESTART_KEYS if serve.get(k) != config.serve.get(k)]
|
||||
|
||||
Reference in New Issue
Block a user