diff options
| author | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-07-22 17:12:49 -0500 |
|---|---|---|
| committer | Ian Cordasco <graffatcolmingov@gmail.com> | 2016-07-22 17:12:49 -0500 |
| commit | 4a46412bf6007356775657e4f0bc452564dec2d1 (patch) | |
| tree | a577be8345803d2c7429517a1dc61e51e15568f8 /src | |
| parent | 473106fee1ec4fcc9e2dde55c821effcd34e8a97 (diff) | |
| download | flake8-4a46412bf6007356775657e4f0bc452564dec2d1.tar.gz | |
Check for alternate_separator only when truthy
In the case where alternate separator is None, we use '' which will
always be in any string. We want to skip that case.
Also we only run our tests on AppVeyor, not all of our testenvs.
Diffstat (limited to 'src')
| -rw-r--r-- | src/flake8/utils.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/flake8/utils.py b/src/flake8/utils.py index f432dac..1e1eaa0 100644 --- a/src/flake8/utils.py +++ b/src/flake8/utils.py @@ -59,7 +59,8 @@ def normalize_path(path, parent=os.curdir): separator = os.path.sep # NOTE(sigmavirus24): os.path.altsep may be None alternate_separator = os.path.altsep or '' - if separator in path or alternate_separator in path: + if separator in path or (alternate_separator and + alternate_separator in path): path = os.path.abspath(os.path.join(parent, path)) return path.rstrip(separator + alternate_separator) |
