From bafcb7dea23b28a565f0b684037f0461e4601be5 Mon Sep 17 00:00:00 2001 From: hauntsaninja <> Date: Tue, 22 Feb 2022 19:07:21 -0800 Subject: [PATCH] Make pyinfo compatible with Python 2 I'm not adding a test because it's Python 2, but I did test locally. --- mypy/pyinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mypy/pyinfo.py b/mypy/pyinfo.py index 3834c04e218e9..ab2d3286bd5cf 100644 --- a/mypy/pyinfo.py +++ b/mypy/pyinfo.py @@ -19,7 +19,7 @@ def getprefixes(): # type: () -> Tuple[str, str] - return sys.base_prefix, sys.prefix + return getattr(sys, "base_prefix", sys.prefix), sys.prefix def getsitepackages():