()
| 162 | # Ubuntu has patched OpenSSL and changed behavior of security level 2 |
| 163 | # see https://bugs.python.org/issue41561#msg389003 |
| 164 | def is_ubuntu(): |
| 165 | try: |
| 166 | # Assume that any references of "ubuntu" implies Ubuntu-like distro |
| 167 | # The workaround is not required for 18.04, but doesn't hurt either. |
| 168 | with open("/etc/os-release", encoding="utf-8") as f: |
| 169 | return "ubuntu" in f.read() |
| 170 | except FileNotFoundError: |
| 171 | return False |
| 172 | |
| 173 | if is_ubuntu(): |
| 174 | def seclevel_workaround(*ctxs): |
no test coverage detected
searching dependent graphs…