From 4a29a0540fb02c85da5eeabd458373b54ab4eb4e Mon Sep 17 00:00:00 2001 From: MicLennartz Date: Thu, 11 Jan 2024 16:04:11 +0100 Subject: [PATCH 1/2] add 'member' to reboot RPC only when it's not None parentheses were missing to reflect the right logic --- lib/jnpr/junos/utils/sw.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/jnpr/junos/utils/sw.py b/lib/jnpr/junos/utils/sw.py index 0231ff383..1203d9100 100644 --- a/lib/jnpr/junos/utils/sw.py +++ b/lib/jnpr/junos/utils/sw.py @@ -1131,8 +1131,8 @@ def _system_operation( elif self._mixed_VC is True: cmd.append(E("all-members")) elif ( - self._multi_VC_nsync is True - or self._multi_VC is True + (self._multi_VC_nsync is True + or self._multi_VC is True) and member_id is not None ): cmd.append(E("member", str(member_id))) From 5c67fcea454d4c1aa4dcfb8ccc3071506baaefec Mon Sep 17 00:00:00 2001 From: eedmicl Date: Mon, 15 Jan 2024 12:48:00 +0100 Subject: [PATCH 2/2] format corrected --- lib/jnpr/junos/utils/sw.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/jnpr/junos/utils/sw.py b/lib/jnpr/junos/utils/sw.py index 1203d9100..30cbbac75 100644 --- a/lib/jnpr/junos/utils/sw.py +++ b/lib/jnpr/junos/utils/sw.py @@ -1131,10 +1131,8 @@ def _system_operation( elif self._mixed_VC is True: cmd.append(E("all-members")) elif ( - (self._multi_VC_nsync is True - or self._multi_VC is True) - and member_id is not None - ): + self._multi_VC_nsync is True or self._multi_VC is True + ) and member_id is not None: cmd.append(E("member", str(member_id))) if in_min >= 0 and at is None: cmd.append(E("in", str(in_min)))