From 22049002bb6f640efa2357e7363f9f8e00d6156d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Thu, 17 May 2018 11:11:11 -0400 Subject: [PATCH] Fix exitcode references before use --- confluent_client/bin/nodefirmware | 1 + confluent_client/confluent/client.py | 1 + 2 files changed, 2 insertions(+) diff --git a/confluent_client/bin/nodefirmware b/confluent_client/bin/nodefirmware index fa033961..143b4819 100755 --- a/confluent_client/bin/nodefirmware +++ b/confluent_client/bin/nodefirmware @@ -127,6 +127,7 @@ def update_firmware(session, filename): sys.stderr.write('{0}: {1}\n'.format(node, noderrs[node])) def show_firmware(session): + global exitcode firmware_shown = False for component in components: for res in session.read( diff --git a/confluent_client/confluent/client.py b/confluent_client/confluent/client.py index 7706da63..c7d4b569 100644 --- a/confluent_client/confluent/client.py +++ b/confluent_client/confluent/client.py @@ -35,6 +35,7 @@ _attraliases = { def printerror(res, node=None): + exitcode = 0 if 'errorcode' in res: exitcode = res['errorcode'] if 'error' in res: