1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

samba-tool ldapcmp: use ValueError, not obsolete StandardError

The error is in the value, and StandardError is not in Python 3

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
This commit is contained in:
Douglas Bagnall 2018-10-11 12:40:09 +13:00 committed by Noel Power
parent 2412ca517d
commit bc8201bdf4

View File

@ -854,7 +854,7 @@ class LDAPBundel(object):
elif self.search_scope == "ONE":
self.search_scope = SCOPE_ONELEVEL
else:
raise StandardError("Wrong 'scope' given. Choose from: SUB, ONE, BASE")
raise ValueError("Wrong 'scope' given. Choose from: SUB, ONE, BASE")
try:
res = self.con.ldb.search(base=self.search_base, scope=self.search_scope, attrs=["dn"])
except LdbError as e3: