diff options
author | Martin Robinson <mrobinson@igalia.com> | 2023-08-02 13:02:02 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-02 11:02:02 +0000 |
commit | 6e84d47fd36a8b3a5cd9f6f61dbc5192f586d498 (patch) | |
tree | 06a9d43d40fcfa2fb57e7d95b0be7b69ef21a2c2 /python/servo/command_base.py | |
parent | f3c7db7d0f45cb935030bd5901133d7e6b9a023b (diff) | |
download | servo-6e84d47fd36a8b3a5cd9f6f61dbc5192f586d498.tar.gz servo-6e84d47fd36a8b3a5cd9f6f61dbc5192f586d498.zip |
Fix the docs build (#30058)
Type inference was incorrectly inferring that our `check_output()`
helper was returning `str` when in reality, it returns `bytes`. This
fixes the caller that was no longer decoding those bytes and fixes the
type annotation on the function.
Diffstat (limited to 'python/servo/command_base.py')
-rw-r--r-- | python/servo/command_base.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py index ce8c1ddb237..43d2e97d89c 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -141,7 +141,7 @@ def call(*args, **kwargs): return subprocess.call(*args, shell=sys.platform == 'win32', **kwargs) -def check_output(*args, **kwargs): +def check_output(*args, **kwargs) -> bytes: """Wrap `subprocess.call`, printing the command if verbose=True.""" verbose = kwargs.pop('verbose', False) if verbose: @@ -980,10 +980,10 @@ class CommandBase(object): servo.platform.get().passive_bootstrap() - needs_toolchain_install = self.cross_compile_target \ - and self.cross_compile_target not in check_output( - ["rustup", "target", "list", "--installed"], cwd=self.context.topdir - ) + needs_toolchain_install = self.cross_compile_target and \ + self.cross_compile_target not in \ + check_output(["rustup", "target", "list", "--installed"], + cwd=self.context.topdir).decode() if needs_toolchain_install: check_call(["rustup", "target", "add", self.cross_compile_target], cwd=self.context.topdir) |