various fixes
This commit is contained in:
@@ -140,14 +140,16 @@ def run_machine_update(
|
||||
"""
|
||||
with ExitStack() as stack:
|
||||
_target_host: Host = cast(
|
||||
Host, stack.enter_context(target_host.host_connection())
|
||||
"Host", stack.enter_context(target_host.host_connection())
|
||||
)
|
||||
_build_host: Host
|
||||
# If no build host is specified, use the target host as the build host.
|
||||
if build_host is None:
|
||||
_build_host = _target_host
|
||||
else:
|
||||
_build_host = cast(Host, stack.enter_context(build_host.host_connection()))
|
||||
_build_host = cast(
|
||||
"Host", stack.enter_context(build_host.host_connection())
|
||||
)
|
||||
|
||||
# Some operations require root privileges on the target host.
|
||||
target_host_root = stack.enter_context(_target_host.become_root())
|
||||
|
||||
Reference in New Issue
Block a user