summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/coroutines.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/coroutines.py')
-rw-r--r--Lib/asyncio/coroutines.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/asyncio/coroutines.py b/Lib/asyncio/coroutines.py
index b6f81a4..7d2ca05 100644
--- a/Lib/asyncio/coroutines.py
+++ b/Lib/asyncio/coroutines.py
@@ -27,11 +27,9 @@ def _is_debug_mode():
# before you define your coroutines. A downside of using this feature
# is that tracebacks show entries for the CoroWrapper.__next__ method
# when _DEBUG is true.
- debug = (not sys.flags.ignore_environment and
- bool(os.environ.get('PYTHONASYNCIODEBUG')))
- if hasattr(sys, '_xoptions') and 'dev' in sys._xoptions:
- debug = True
- return debug
+ return (sys.flags.dev_mode
+ or (not sys.flags.ignore_environment
+ and bool(os.environ.get('PYTHONASYNCIODEBUG'))))
_DEBUG = _is_debug_mode()