This is an automated email from the ASF dual-hosted git repository.

sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git


The following commit(s) were added to refs/heads/main by this push:
     new ad085680 Assure debug mode is only set in development
ad085680 is described below

commit ad085680e2d6da549492b1ebad4f2d44b244a9a0
Author: Dave Fisher <[email protected]>
AuthorDate: Thu Feb 19 09:50:19 2026 -0800

    Assure debug mode is only set in development
---
 atr/server.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/atr/server.py b/atr/server.py
index b5d28b9b..f32269a2 100644
--- a/atr/server.py
+++ b/atr/server.py
@@ -545,6 +545,8 @@ def _create_app(app_config: type[config.AppConfig]) -> 
base.QuartApp:
     if os.sep != "/":
         raise RuntimeError('ATR requires a POSIX compatible filesystem where 
os.sep is "/"')
     config_mode = config.get_mode()
+    if not util.is_dev_environment() and config_mode == config.Mode.Debug:
+        raise RuntimeError("Debug mode can only be set in development 
environment")
     hot_reload = _is_hot_reload()
     _validate_config(app_config, hot_reload)
     _migrate_state(app_config.STATE_DIR, hot_reload)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to