summaryrefslogtreecommitdiffstats
path: root/Lib/subprocess.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/subprocess.py')
-rw-r--r--Lib/subprocess.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/Lib/subprocess.py b/Lib/subprocess.py
index 97b4493..35bfddd 100644
--- a/Lib/subprocess.py
+++ b/Lib/subprocess.py
@@ -262,15 +262,11 @@ def _args_from_interpreter_flags():
args.append('-' + opt * v)
# -W options
- warnoptions = sys.warnoptions
- xoptions = getattr(sys, '_xoptions', {})
- if 'dev' in xoptions and warnoptions and warnoptions[-1] == 'default':
- # special case: -X dev adds 'default' to sys.warnoptions
- warnoptions = warnoptions[:-1]
- for opt in warnoptions:
+ for opt in sys.warnoptions:
args.append('-W' + opt)
# -X options
+ xoptions = getattr(sys, '_xoptions', {})
if 'dev' in xoptions:
args.extend(('-X', 'dev'))
for opt in ('faulthandler', 'tracemalloc', 'importtime',