From f02bc8b2af6de47962e3670e719d756df0cba029 Mon Sep 17 00:00:00 2001 From: Ruben van Dijk <15885455+RubenNL@users.noreply.github.com> Date: Mon, 9 Jun 2025 13:18:39 +0200 Subject: T7320: Fixed compatibility with Paramiko by removing all "null" bytes. (#409) Fixes issue found in this comment: https://github.com/vyos/vyos.vyos/pull/407#issuecomment-2774775677 Co-authored-by: omnom62 <75066712+omnom62@users.noreply.github.com> --- changelogs/fragments/T7320-paramiko.yaml | 2 ++ plugins/cliconf/vyos.py | 1 + 2 files changed, 3 insertions(+) create mode 100644 changelogs/fragments/T7320-paramiko.yaml diff --git a/changelogs/fragments/T7320-paramiko.yaml b/changelogs/fragments/T7320-paramiko.yaml new file mode 100644 index 00000000..fd253b65 --- /dev/null +++ b/changelogs/fragments/T7320-paramiko.yaml @@ -0,0 +1,2 @@ +bugfixes: + - Fixed compatibility with paramiko. diff --git a/plugins/cliconf/vyos.py b/plugins/cliconf/vyos.py index 5beffaa1..8cbafb1d 100644 --- a/plugins/cliconf/vyos.py +++ b/plugins/cliconf/vyos.py @@ -138,6 +138,7 @@ class Cliconf(CliconfBase): requests.append(cmd["command"]) out = self.get("compare") out = to_text(out, errors="surrogate_or_strict") + out = out.replace("\u0000", "") diff_config = out if not out.startswith("No changes") else None if diff_config: -- cgit v1.2.3