MCPcopy Create free account
hub / github.com/StackStorm/st2 / is_use_debugger_flag_provided

Function is_use_debugger_flag_provided

st2common/st2common/util/monkey_patch.py:108–124  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

106
107
108def is_use_debugger_flag_provided():
109 # 1. Check sys.argv directly
110 if USE_DEBUGGER_FLAG in sys.argv:
111 return True
112
113 # 2. Check "parent-args" arguments. This is used for spawned processes such as sensors and
114 # Python runner actions
115
116 for arg in sys.argv:
117 if arg.startswith(PARENT_ARGS_FLAG) and USE_DEBUGGER_FLAG in arg:
118 return True
119
120 # 3. Check for ST2_USE_DEBUGGER env var
121 if os.environ.get(USE_DEBUGGER_ENV_VAR, False):
122 return True
123
124 return False

Callers 1

monkey_patchFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected