Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Open with utf-8 encoding
  • Loading branch information
tiran committed Mar 18, 2021
commit 719f100c698fb2d961629f29c0028c9201cb0954
5 changes: 3 additions & 2 deletions Lib/test/test_ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ def data_file(*name):
# see https://bugs.python.org/issue41561#msg389003
def is_ubuntu():
try:
# assume that any references of "ubuntu" implies Ubuntu-like distro
with open("/etc/os-release") as f:
# Assume that any references of "ubuntu" implies Ubuntu-like distro
# The workaround is not required for 18.04, but doesn't hurt either.
with open("/etc/os-release", encoding="utf-8") as f:
return "ubuntu" in f.read()
except FileNotFoundError:
return False
Expand Down