Skip to content

Commit a3fc35a

Browse files
authored
Make pyinfo compatible with Python 2 (#12244)
I'm not adding a test because it's Python 2, but I did test locally. Co-authored-by: hauntsaninja <>
1 parent fa3adbd commit a3fc35a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mypy/pyinfo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
def getprefixes():
2121
# type: () -> Tuple[str, str]
22-
return sys.base_prefix, sys.prefix
22+
return getattr(sys, "base_prefix", sys.prefix), sys.prefix
2323

2424

2525
def getsitepackages():

0 commit comments

Comments
 (0)