mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
[PR #11391/b67c94fc backport][stable-12] fix ruff cases UP024,UP041 (#11394)
fix ruff cases UP024,UP041 (#11391)
* fix ruff cases UP024,UP041
* add changelog frag
(cherry picked from commit b67c94fc3f)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
This commit is contained in:
@@ -312,7 +312,6 @@ import io
|
||||
import os
|
||||
import pathlib
|
||||
import shlex
|
||||
import socket
|
||||
import tempfile
|
||||
import traceback
|
||||
import typing as t
|
||||
@@ -667,7 +666,7 @@ class Connection(ConnectionBase):
|
||||
elif in_data == b"":
|
||||
chan.shutdown_write()
|
||||
|
||||
except socket.timeout as e:
|
||||
except TimeoutError as e:
|
||||
raise AnsibleError(f"ssh timed out waiting for privilege escalation.\n{to_text(become_output)}") from e
|
||||
|
||||
stdout = b"".join(chan.makefile("rb", bufsize))
|
||||
|
||||
Reference in New Issue
Block a user