mysql: explicity cast python command to str in _fix_dtrace_shebang() (#40781)
This should fix issue #40780 We explicitly cast self.spec["python"].command to str in the filter_file call in _fix_dtrace_shebang to avoid the error ==> Error: TypeError: expected str, bytes or os.PathLike object, not Executable Not sure why the error is appearing (is it only for specific python versions, etc?), but the fix should be quite safe.
This commit is contained in:
parent
17bfc41841
commit
935660e3d5
@ -203,7 +203,7 @@ def _fix_dtrace_shebang(self, env):
|
||||
copy(dtrace, dtrace_copy)
|
||||
filter_file(
|
||||
"^#!/usr/bin/python",
|
||||
"#!/usr/bin/env {0}".format(os.path.basename(self.spec["python"].command)),
|
||||
"#!/usr/bin/env {0}".format(os.path.basename(str(self.spec["python"].command))),
|
||||
dtrace_copy,
|
||||
)
|
||||
# To have our own copy of dtrace in PATH, we need to
|
||||
|
Loading…
Reference in New Issue
Block a user