Skip to content

Commit c7e144d

Browse files
committed
fix mypy
Signed-off-by: Aleksei Stepanov <penguinolog@gmail.com>
1 parent bfc56a9 commit c7e144d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

exec_helpers/_ssh_client_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ def _prepare_command(self, cmd: str, chroot_path: typing.Optional[str] = None) -
409409
if not self.sudo_mode:
410410
return super()._prepare_command(cmd=cmd, chroot_path=chroot_path)
411411
if any((chroot_path, self._chroot_path)):
412-
target_path: str = shlex.quote(chroot_path if chroot_path else self._chroot_path)
412+
target_path: str = shlex.quote(chroot_path if chroot_path else self._chroot_path) # type: ignore
413413
return f'chroot {target_path} sudo sh -c "eval {shlex.quote(cmd)}"'
414414
return f'sudo -S sh -c "eval {shlex.quote(cmd)}"'
415415

exec_helpers/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ def _prepare_command(self, cmd: str, chroot_path: typing.Optional[str] = None) -
228228
:returns: final command, includes chroot, if required
229229
"""
230230
if any((chroot_path, self._chroot_path)):
231-
target_path: str = shlex.quote(chroot_path if chroot_path else self._chroot_path)
231+
target_path: str = shlex.quote(chroot_path if chroot_path else self._chroot_path) # type: ignore
232232
return f'chroot {target_path} sh -c "eval {shlex.quote(cmd)}"'
233233
return cmd
234234

0 commit comments

Comments
 (0)