From 7f4dcaa5f1aeb8126dd0d15e36e6cdcaa0bfa8ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Tue, 3 Nov 2020 14:55:43 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20pi=5Fsupport:=20Use=20flag=20file?= =?UTF-8?q?=20for=20local=20debug=20mode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + src/octoprint/plugins/pi_support/__init__.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 930e41f7b..f330dc36c 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ src/octoprint/templates/_data/AUTHORS.md src/octoprint/templates/_data/CHANGELOG.md src/octoprint/templates/_data/SUPPORTERS.md src/octoprint/templates/_data/THIRDPARTYLICENSES.md +src/octoprint/plugins/pi_support/.local_debug docs/_build devtools diff --git a/src/octoprint/plugins/pi_support/__init__.py b/src/octoprint/plugins/pi_support/__init__.py index 86d119a77..4568ee14a 100644 --- a/src/octoprint/plugins/pi_support/__init__.py +++ b/src/octoprint/plugins/pi_support/__init__.py @@ -25,7 +25,9 @@ _VCGENCMD_THROTTLE = "/usr/bin/vcgencmd get_throttled" _CHECK_INTERVAL_OK = 300 _CHECK_INTERVAL_THROTTLED = 30 -__LOCAL_DEBUG = False +__LOCAL_DEBUG = os.path.exists( + os.path.realpath(os.path.join(os.path.dirname(__file__), ".local_debug")) +) if __LOCAL_DEBUG: ### mocks & settings for local debugging