From 079a60e13e7effc78c959637708b01332bcd4709 Mon Sep 17 00:00:00 2001 From: dineshbaburam91 Date: Wed, 16 Oct 2024 10:40:33 +0530 Subject: [PATCH 1/2] Fixed the version check --- lib/jnpr/junos/device.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jnpr/junos/device.py b/lib/jnpr/junos/device.py index 6042cd5ef..bd4cb2644 100644 --- a/lib/jnpr/junos/device.py +++ b/lib/jnpr/junos/device.py @@ -870,8 +870,8 @@ def execute(self, rpc_cmd, ignore_warning=False, **kvargs): ver_info = self.facts.get("version_info") if ( ver_info - and ver_info.major[0] >= 15 - or (ver_info.major[0] == 14 and ver_info.major[1] >= 2) + and (ver_info.major[0] >= 15 + or (ver_info.major[0] == 14 and ver_info.major[1] >= 2)) ): try: return json.loads(rpc_rsp_e.text, strict=False) From 0d045145a03c9eaebf39f01a89d8b74251c1ed47 Mon Sep 17 00:00:00 2001 From: dineshbaburam91 Date: Wed, 16 Oct 2024 10:52:31 +0530 Subject: [PATCH 2/2] fixed black format --- lib/jnpr/junos/device.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/jnpr/junos/device.py b/lib/jnpr/junos/device.py index bd4cb2644..063ffb344 100644 --- a/lib/jnpr/junos/device.py +++ b/lib/jnpr/junos/device.py @@ -868,10 +868,9 @@ def execute(self, rpc_cmd, ignore_warning=False, **kvargs): "JSON", ]: ver_info = self.facts.get("version_info") - if ( - ver_info - and (ver_info.major[0] >= 15 - or (ver_info.major[0] == 14 and ver_info.major[1] >= 2)) + if ver_info and ( + ver_info.major[0] >= 15 + or (ver_info.major[0] == 14 and ver_info.major[1] >= 2) ): try: return json.loads(rpc_rsp_e.text, strict=False)