From 31c28623e7fe62d4f36752466252a43d995e2b3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Busse?= Date: Thu, 4 Mar 2021 20:57:24 +0100 Subject: [PATCH] hbase-read: Use dict only on success --- hbase-exporter | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hbase-exporter b/hbase-exporter index 24268eb..c811098 100755 --- a/hbase-exporter +++ b/hbase-exporter @@ -613,14 +613,14 @@ class hbase_exporter(): try: rsp = pybase_client.get(hbase_table, key) self.hbase_read_success = 1 + rspd = self.result_to_dict(rsp) + logging.debug('hbase: Read: ') + for k, v in rspd.items(): + logging.debug('key: %', k) + logging.debug('value: %', v) except: self.hbase_read_success = 0 - rspd = self.result_to_dict(rsp) - logging.debug('hbase: Read: ') - for k, v in rspd.items(): - logging.debug('key: %', k) - logging.debug('value: %', v) # Write access try: