Use `isdir` instead of `exists`
This commit is contained in:
parent
3b757b1b8c
commit
056d9e8dc2
|
@ -170,7 +170,7 @@ def _in_venv(path):
|
|||
"""Attempts to detect if ``path`` is the root of a Virtual Environment by
|
||||
checking for the existence of the appropriate activate script"""
|
||||
bindir = path.join('Scripts' if sys.platform.startswith('win') else 'bin')
|
||||
if not bindir.exists():
|
||||
if not bindir.isdir():
|
||||
return False
|
||||
activates = ('activate', 'activate.csh', 'activate.fish',
|
||||
'Activate', 'Activate.bat', 'Activate.ps1')
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Refactor check of bindir from `exists` to `isdir`.
|
||||
|
Loading…
Reference in New Issue