Getting the right samdb is going to matter more, so it is useful for
debugging to see which is which.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
super().connect(url=url, flags=flags, options=options)
+ def __repr__(self):
+ if self.url:
+ return f"<SamDB {id(self):x} ({self.url})>"
+
+ return f"<SamDB {id(self):x} (no connection)>"
+
+ __str__ = __repr__
+
def am_rodc(self):
"""return True if we are an RODC"""
return dsdb._am_rodc(self)