1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

traffic: avoid bare except: clauses

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2018-10-19 17:19:29 +13:00 committed by Douglas Bagnall
parent 41b0cfce2c
commit 31c0809e4f

View File

@ -484,7 +484,7 @@ class ReplayContext(object):
random.random() < self.badpassword_frequency):
try:
f(bad)
except:
except Exception:
# Ignore any exceptions as the operation may fail
# as it's being performed with bad credentials
pass
@ -2235,7 +2235,7 @@ def opcode_key(v):
"""Sort key for the operation code to ensure that it sorts numerically"""
try:
return "%03d" % int(v)
except:
except ValueError:
return v