From 5c93df28822eca2f5702df9f1cda79f8264dcf7a Mon Sep 17 00:00:00 2001 From: Nils Stein <31704359+mietzen@users.noreply.github.com> Date: Wed, 18 Dec 2024 10:08:20 +0100 Subject: [PATCH] remove quote and use int for vmid --- plugins/connection/pct_remote.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/connection/pct_remote.py b/plugins/connection/pct_remote.py index 0ce17bb51be..ddd8a2f788c 100644 --- a/plugins/connection/pct_remote.py +++ b/plugins/connection/pct_remote.py @@ -214,7 +214,7 @@ vmid: description: - LXC Container ID - type: str + type: int default: proxmox_vmid vars: - name: proxmox_vmid @@ -527,7 +527,7 @@ def _connect_uncached(self) -> paramiko.SSHClient: def exec_command(self, cmd: str, in_data: bytes | None = None, sudoable: bool = True) -> tuple[int, bytes, bytes]: ''' execute a command inside the proxmox container ''' cmd = ['/usr/sbin/pct', 'exec', - self.get_option('vmid'), '--', quote(cmd)] + str(self.get_option('vmid')), '--', cmd] if self.get_option('remote_user') != 'root': cmd = [become_command()] + cmd return self._ssh_exec_command(' '.join(cmd), in_data=in_data, sudoable=sudoable) @@ -540,7 +540,7 @@ def put_file(self, in_path: str, out_path: str) -> None: self._ssh_exec_command(f'mkdir -p {temp_dir}') self._ssh_put_file(in_path, temp_file_path) cmd = ['/usr/sbin/pct', 'push', - self.get_option('vmid'), temp_file_path, quote(out_path)] + str(self.get_option('vmid')), temp_file_path, out_path] if self.get_option('remote_user') != 'root': cmd = [become_command()] + cmd self._ssh_exec_command(' '.join(cmd)) @@ -557,7 +557,7 @@ def fetch_file(self, in_path: str, out_path: str) -> None: try: self._ssh_exec_command(f'mkdir -p {temp_dir}') cmd = ['/usr/sbin/pct', 'pull', - self.get_option('vmid'), quote(in_path), temp_file_path] + str(self.get_option('vmid')), in_path, temp_file_path] if self.get_option('remote_user') != 'root': cmd = [become_command()] + cmd self._ssh_exec_command(' '.join(cmd))