summaryrefslogtreecommitdiff
path: root/isort/settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'isort/settings.py')
-rw-r--r--isort/settings.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/isort/settings.py b/isort/settings.py
index b11d2e6b..43a0f2a4 100644
--- a/isort/settings.py
+++ b/isort/settings.py
@@ -383,7 +383,7 @@ def file_should_be_skipped(
if normalized_path[1:2] == ':':
normalized_path = normalized_path[2:]
- if config['safety_excludes']:
+ if path and config['safety_excludes']:
check_exclude = '/' + filename.replace('\\', '/') + '/'
if path and os.path.basename(path) in ('lib', ):
check_exclude = '/' + os.path.basename(path) + check_exclude