Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: AttributeError on macOS creating a Python 2.x virtualenv #2270

Merged
merged 1 commit into from
Jan 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions docs/changelog/bugfix.2269.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix ``AttributeError: 'bool' object has no attribute 'error'`` when creating a
Python 2.x virtualenv on macOS - by ``moreati``
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ def image_ref(cls, interpreter):
class CPython2macOsFramework(CPythonmacOsFramework, CPython2PosixBase):
@classmethod
def can_create(cls, interpreter):
return not IS_MAC_ARM64 and super(CPython2macOsFramework, cls).can_describe(interpreter)
if not IS_MAC_ARM64 and super(CPython2macOsFramework, cls).can_describe(interpreter):
return super(CPython2macOsFramework, cls).can_create(interpreter)
gaborbernat marked this conversation as resolved.
Show resolved Hide resolved
return False

@classmethod
def image_ref(cls, interpreter):
Expand Down Expand Up @@ -111,7 +113,9 @@ def reload_code(self):
class CPython2macOsArmFramework(CPython2macOsFramework, CPythonmacOsFramework, CPython2PosixBase):
@classmethod
def can_create(cls, interpreter):
return IS_MAC_ARM64 and super(CPythonmacOsFramework, cls).can_describe(interpreter)
if IS_MAC_ARM64 and super(CPythonmacOsFramework, cls).can_describe(interpreter):
return super(CPythonmacOsFramework, cls).can_create(interpreter)
return False

def create(self):
super(CPython2macOsFramework, self).create()
Expand Down