Kaydet (Commit) fd93f37f authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) GitHub

bpo-30448: Fix support.SuppressCrashReport on macOS (#2515)

Add missing "import subprocess".
üst 311ae46e
......@@ -1916,12 +1916,12 @@ class SuppressCrashReport:
#
# This assumes that this context manager is used in tests
# that might trigger the next manager.
import subprocess
cmd = ['/usr/bin/defaults', 'read',
'com.apple.CrashReporter', 'DialogType']
proc = subprocess.Popen(cmd,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
with proc:
stdout = proc.communicate()[0]
if stdout.strip() == b'developer':
sys.stdout.write("this test triggers the Crash Reporter, "
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment