mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
bpo-30448: Fix support.SuppressCrashReport on macOS (#2515)
Add missing "import subprocess".
This commit is contained in:
@@ -1916,13 +1916,13 @@ 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]
|
||||
stdout = proc.communicate()[0]
|
||||
if stdout.strip() == b'developer':
|
||||
sys.stdout.write("this test triggers the Crash Reporter, "
|
||||
"that is intentional")
|
||||
|
||||
Reference in New Issue
Block a user