@@ -220,7 +220,7 @@ def _filter_paths(self, key, paths):
220
220
if filtered_paths != paths :
221
221
removed_paths = paths if filtered_paths is None else [x for x in paths if x not in filtered_paths ]
222
222
print_warning ("Suppressed adding the following path(s) to $%s of the module as they were already added: %s" ,
223
- key , removed_paths ,
223
+ key , ', ' . join ( removed_paths ) ,
224
224
log = self .log )
225
225
if not filtered_paths :
226
226
filtered_paths = None
@@ -261,10 +261,6 @@ def update_paths(self, key, paths, prepend=True, allow_abs=False, expand_relpath
261
261
self .log .debug ("Wrapping %s into a list before using it for %s" , paths , key )
262
262
paths = [paths ]
263
263
264
- paths = self ._filter_paths (key , paths )
265
- if paths is None :
266
- return ''
267
-
268
264
if key == 'PYTHONPATH' :
269
265
python_paths = [path for path in paths if re .match (r'lib/python\d+\.\d+/site-packages' , path )]
270
266
if len (python_paths ) > 1 :
@@ -985,6 +981,10 @@ def _update_paths(self, key, paths, prepend=True, allow_abs=False, expand_relpat
985
981
:param allow_abs: allow providing of absolute paths
986
982
:param expand_relpaths: expand relative paths into absolute paths (by prefixing install dir)
987
983
"""
984
+ paths = self ._filter_paths (key , paths )
985
+ if paths is None :
986
+ return ''
987
+
988
988
if prepend :
989
989
update_type = 'prepend'
990
990
else :
@@ -1452,6 +1452,10 @@ def _update_paths(self, key, paths, prepend=True, allow_abs=False, expand_relpat
1452
1452
:param allow_abs: allow providing of absolute paths
1453
1453
:param expand_relpaths: expand relative paths into absolute paths (by prefixing install dir)
1454
1454
"""
1455
+ paths = self ._filter_paths (key , paths )
1456
+ if paths is None :
1457
+ return ''
1458
+
1455
1459
if prepend :
1456
1460
update_type = 'prepend'
1457
1461
else :
0 commit comments