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

@ -392,7 +392,7 @@ def remove_dhcp_reservation(zk_conn, network, reservation):
# Remove the entry from zookeeper
try:
zkhandler.deletekey(zk_conn, '/networks/{}/dhcp4_{}/{}'.format(net_vni, lease_type_zk, match_description))
except:
except Exception:
return False, 'ERROR: Failed to write to Zookeeper!'
return True, 'DHCP {} "{}" removed successfully!'.format(lease_type_human, match_description)