File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ def check():
135135 return True
136136
137137
138- def find_compatible_pythons (ignore_pythons = None ):
138+ def find_compatible_pythons (ignore_pythons = None ): # pylint: disable=too-many-branches
139139 ignore_list = []
140140 for p in ignore_pythons or []:
141141 ignore_list .extend (glob .glob (p ))
@@ -171,9 +171,17 @@ def find_compatible_pythons(ignore_pythons=None):
171171 stderr = subprocess .STDOUT ,
172172 )
173173 result .append (item )
174- log .debug (output .decode ().strip ())
174+ try :
175+ log .debug (output .decode ().strip ())
176+ except UnicodeDecodeError :
177+ pass
175178 except subprocess .CalledProcessError as e : # pylint:disable=bare-except
176- error = e .output .decode ()
179+ try :
180+ error = e .output .decode ()
181+ log .debug (error )
182+ except UnicodeDecodeError :
183+ pass
184+ error = error or ""
177185 if "Could not find distutils module" in error :
178186 # pylint:disable=line-too-long
179187 raise click .ClickException (
@@ -184,5 +192,4 @@ def find_compatible_pythons(ignore_pythons=None):
184192
185193(MAY require administrator access `sudo`)""" ,
186194 )
187- log .debug (error )
188195 return result
You can’t perform that action at this time.
0 commit comments