File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ Avoid AttributeError in easy_install.create_home_path when sysconfig.get_config_vars values are not strings.
Original file line number Diff line number Diff line change @@ -1334,7 +1334,7 @@ def create_home_path(self):
13341334 if not self .user :
13351335 return
13361336 home = convert_path (os .path .expanduser ("~" ))
1337- for name , path in self .config_vars .items ( ):
1337+ for path in only_strs ( self .config_vars .values () ):
13381338 if path .startswith (home ) and not os .path .isdir (path ):
13391339 self .debug_print ("os.makedirs('%s', 0o700)" % path )
13401340 os .makedirs (path , 0o700 )
@@ -2304,6 +2304,13 @@ def current_umask():
23042304 return tmp
23052305
23062306
2307+ def only_strs (values ):
2308+ """
2309+ Exclude non-str values. Ref #3063.
2310+ """
2311+ return filter (lambda val : isinstance (val , str ), values )
2312+
2313+
23072314class EasyInstallDeprecationWarning (SetuptoolsDeprecationWarning ):
23082315 """
23092316 Warning for EasyInstall deprecations, bypassing suppression.
You can’t perform that action at this time.
0 commit comments