In commit
6de9d878b, a dummy SamDB lambda was added:
SamDB = lambda *x: None
The `*x` will only cover positional args. If we call it with kwargs:
samdb = SamDB(url=url)
We will get TypeError:
<lambda>() got an unexpected keyword argument 'url'
This commit fix this. It also fix PEP8 E731:
do not assign a lambda expression, use a def
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13542
Signed-off-by: Joe Guo <joeg@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
except ImportError:
# We are built without samdb support,
# imitate it so that connect_samdb() can recover
- SamDB = lambda *x: None
+ def SamDB(*args, **kwargs):
+ return None
+
import samba.ndr
import samba.dcerpc.dcerpc
import samba.dcerpc.epmapper