You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by sb...@apache.org on 2026/02/19 18:11:44 UTC

(tooling-trusted-releases) branch main updated: Assure debug mode is only set in development

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 <da...@comcast.net>
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: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org