diff --git a/class/core/mw.py b/class/core/mw.py index 15f4c1018..ff8ab8a5a 100755 --- a/class/core/mw.py +++ b/class/core/mw.py @@ -111,6 +111,17 @@ def isAppleSystem(): return False +def isDebugMode(): + if isAppleSystem(): + return True + + debugPath = getRunDir() + "/data/debug.pl" + if os.path.exists(debugPath): + return True + + return False + + def isNumber(s): try: float(s) diff --git a/class/core/plugins_api.py b/class/core/plugins_api.py index d989ff5ff..f144fdfc9 100755 --- a/class/core/plugins_api.py +++ b/class/core/plugins_api.py @@ -845,7 +845,7 @@ class plugins_api: return ('', '') data = mw.execShell(py_cmd) - if mw.isAppleSystem(): + if mw.isDebugMode(): print('run', py_cmd) print(data) # print os.path.exists(py_cmd) @@ -861,7 +861,7 @@ class plugins_api: sys.path.append(package) eval_str = "__import__('" + script + "')." + func + '(' + args + ')' newRet = eval(eval_str) - if mw.isAppleSystem(): + if mw.isDebugMode(): print('callback', eval_str) return (True, newRet)