diff options
author | Ian Lee <IanLee1521@gmail.com> | 2014-12-13 13:34:29 -0800 |
---|---|---|
committer | Ian Lee <IanLee1521@gmail.com> | 2014-12-13 13:34:29 -0800 |
commit | 144a4d09927f421a5bb5968190c35fa8ae189d41 (patch) | |
tree | 9bfb7ff94ddad9d6d6f28068b8cc29b43e74b3f4 /pep8.py | |
parent | 499013556679f8c23de346a5f2ad48870edcb56c (diff) | |
parent | 4f5e7120a840a40e6184de06c2ec8b081196ccc1 (diff) | |
download | pep8-144a4d09927f421a5bb5968190c35fa8ae189d41.tar.gz |
Merge branch 'willkg:normalize_path_fix'
Pull request #343, Issues #339 / #343
Diffstat (limited to 'pep8.py')
-rwxr-xr-x | pep8.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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('/')) |