summaryrefslogtreecommitdiff
path: root/pep8.py
diff options
context:
space:
mode:
authorIan Lee <IanLee1521@gmail.com>2014-12-13 13:34:29 -0800
committerIan Lee <IanLee1521@gmail.com>2014-12-13 13:34:29 -0800
commit144a4d09927f421a5bb5968190c35fa8ae189d41 (patch)
tree9bfb7ff94ddad9d6d6f28068b8cc29b43e74b3f4 /pep8.py
parent499013556679f8c23de346a5f2ad48870edcb56c (diff)
parent4f5e7120a840a40e6184de06c2ec8b081196ccc1 (diff)
downloadpep8-144a4d09927f421a5bb5968190c35fa8ae189d41.tar.gz
Merge branch 'willkg:normalize_path_fix'
Pull request #343, Issues #339 / #343
Diffstat (limited to 'pep8.py')
-rwxr-xr-xpep8.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/pep8.py b/pep8.py
index 1000a06..d638388 100755
--- a/pep8.py
+++ b/pep8.py
@@ -1156,10 +1156,13 @@ def normalize_paths(value, parent=os.curdir):
Return a list of absolute paths.
"""
- if not value or isinstance(value, list):
+ if not value:
+ return []
+ if isinstance(value, list):
return value
paths = []
for path in value.split(','):
+ path = path.strip()
if '/' in path:
path = os.path.abspath(os.path.join(parent, path))
paths.append(path.rstrip('/'))