Skip to content

Commit 7ab08e5

Browse files
authored
ansi_escape_codes can be configured when creating a connection object
1 parent a8fb494 commit 7ab08e5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

netmiko/base_connection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ def __init__(
157157
secret: str = "",
158158
port: Optional[int] = None,
159159
device_type: str = "",
160+
ansi_escape_codes: bool = False,
160161
verbose: bool = False,
161162
global_delay_factor: float = 1.0,
162163
global_cmd_verify: Optional[bool] = None,
@@ -226,6 +227,8 @@ def __init__(
226227
227228
:param device_type: Class selection based on device type.
228229
230+
:param ansi_escape_codes: Remove any ANSI (VT100) ESC codes from the output
231+
229232
:param verbose: Enable additional messages to standard output.
230233
231234
:param global_delay_factor: Multiplication factor affecting Netmiko delays (default: 1).
@@ -361,7 +364,7 @@ def __init__(
361364
self.password = password
362365
self.secret = secret
363366
self.device_type = device_type
364-
self.ansi_escape_codes = False
367+
self.ansi_escape_codes = ansi_escape_codes
365368
self.verbose = verbose
366369
self.auth_timeout = auth_timeout
367370
self.banner_timeout = banner_timeout

0 commit comments

Comments
 (0)