Lint: E722 do not use bare 'except' (2)

This commit is contained in:
2020-11-06 19:24:10 -05:00
parent d9e7b7ec15
commit 2d8f684fc8
6 changed files with 34 additions and 34 deletions

View File

@ -37,14 +37,14 @@ def set_maintenance(zk_conn, maint_state):
else:
zkhandler.writedata(zk_conn, {'/maintenance': 'false'})
return True, 'Successfully set cluster in normal mode'
except:
except Exception:
return False, 'Failed to set cluster maintenance state'
def getClusterInformation(zk_conn):
# Get cluster maintenance state
try:
maint_state = zkhandler.readdata(zk_conn, '/maintenance')
except:
except Exception:
maint_state = 'false'
# List of messages to display to the clients