diff --git a/CHANGELOG.md b/CHANGELOG.md index 5819916a0..3682f6cc0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ Changelog ========= +### 4.3.12 - March 6, 2019 - hot fix release +- Fix error caused when virtual environment not detected + ### 4.3.11 - March 6, 2019 - hot fix release - Fixed issue #876: confused by symlinks pointing to virtualenv gives FIRSTPARTY not THIRDPARTY - Fixed issue #873: current version skips every file on travis diff --git a/isort/__init__.py b/isort/__init__.py index ca921a53e..6d5189203 100644 --- a/isort/__init__.py +++ b/isort/__init__.py @@ -25,4 +25,4 @@ from . import settings # noqa: F401 from .isort import SortImports # noqa: F401 -__version__ = "4.3.11" +__version__ = "4.3.12" diff --git a/isort/finders.py b/isort/finders.py index 537e8491f..fc9e8cf7a 100644 --- a/isort/finders.py +++ b/isort/finders.py @@ -140,7 +140,8 @@ def __init__(self, config, sections): # virtual env self.virtual_env = self.config.get('virtual_env') or os.environ.get('VIRTUAL_ENV') - self.virtual_env = os.path.realpath(self.virtual_env) + if self.virtual_env: + self.virtual_env = os.path.realpath(self.virtual_env) self.virtual_env_src = False if self.virtual_env: self.virtual_env_src = '{0}/src/'.format(self.virtual_env) diff --git a/setup.py b/setup.py index 1af81cb5c..f284e1695 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ readme = f.read() setup(name='isort', - version='4.3.11', + version='4.3.12', description='A Python utility / library to sort Python imports.', long_description=readme, author='Timothy Crosley',