diff --git a/openwrt_backup/utils.py b/openwrt_backup/utils.py index 5a227e8..0b6426b 100755 --- a/openwrt_backup/utils.py +++ b/openwrt_backup/utils.py @@ -1,6 +1,8 @@ -import paramiko from pathlib import Path from subprocess import list2cmdline +from typing import Union + +import paramiko def connection_from_config(name: str, ssh_config_root: Path): @@ -44,7 +46,7 @@ def connection_from_config(name: str, ssh_config_root: Path): return client -def exec_remote(connection: paramiko.SSHClient, command): +def exec_remote(connection: paramiko.SSHClient, command: Union[str, list]): """Function to execute specified command on conection""" if not isinstance(command, str): command = list2cmdline(command)