]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
samba-tool ldapcmp: use ValueError, not obsolete StandardError
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 10 Oct 2018 23:40:09 +0000 (12:40 +1300)
committerNoel Power <npower@samba.org>
Thu, 25 Oct 2018 19:45:57 +0000 (21:45 +0200)
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>
python/samba/netcmd/ldapcmp.py

index 6508a8fe5db42f2976feec687c48ea04dd550803..312c8ecba0a5c197232b74c88c052058701e4991 100644 (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: