(self, enabled)
| 2068 | handle = None # Needed to break cycles when an exception occurs. |
| 2069 | |
| 2070 | def _set_coroutine_origin_tracking(self, enabled): |
| 2071 | if bool(enabled) == bool(self._coroutine_origin_tracking_enabled): |
| 2072 | return |
| 2073 | |
| 2074 | if enabled: |
| 2075 | self._coroutine_origin_tracking_saved_depth = ( |
| 2076 | sys.get_coroutine_origin_tracking_depth()) |
| 2077 | sys.set_coroutine_origin_tracking_depth( |
| 2078 | constants.DEBUG_STACK_DEPTH) |
| 2079 | else: |
| 2080 | sys.set_coroutine_origin_tracking_depth( |
| 2081 | self._coroutine_origin_tracking_saved_depth) |
| 2082 | |
| 2083 | self._coroutine_origin_tracking_enabled = enabled |
| 2084 | |
| 2085 | def get_debug(self): |
| 2086 | return self._debug |
no outgoing calls
no test coverage detected