Skip to content

Commit 73f60a3

Browse files
authored
Merge pull request #1399 from palfrey/ssl-discovery-with-builtin
tests: Handle builtin _ssl module on Linux
2 parents 492bd2f + 4251991 commit 73f60a3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/fork_test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@
2727

2828

2929
def _find_ssl_linux():
30+
ssl_object_path = getattr(_ssl, "__file__", None)
31+
if ssl_object_path is None:
32+
# No __file__ because it's builtin
33+
ssl_object_path = sys.executable
3034
proc = subprocess.Popen(
31-
['ldd', _ssl.__file__],
35+
['ldd', ssl_object_path],
3236
stdout=subprocess.PIPE, stderr=subprocess.PIPE,
3337
)
3438
b_stdout, b_stderr = proc.communicate()

0 commit comments

Comments
 (0)