s4-samdb: save the url in the samdb class
authorAndrew Tridgell <tridge@samba.org>
Wed, 3 Aug 2011 01:31:45 +0000 (11:31 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 4 Aug 2011 06:17:25 +0000 (16:17 +1000)
this is useful for debugging, so we know which database we are dealing
with

Pair-Programmed-With: Amitay Isaacs <amitay@gmail.com>

source4/scripting/python/samba/samdb.py

index 6f3953540a2784a13028bb857dec0ab39db2f888..8a12c9746a717930896ee5bdec6c3c64fc1c5ee9 100644 (file)
@@ -48,6 +48,8 @@ class SamDB(samba.Ldb):
         elif url is None and lp is not None:
             url = lp.samdb_url()
 
+        self.url = url
+
         super(SamDB, self).__init__(url=url, lp=lp, modules_dir=modules_dir,
             session_info=session_info, credentials=credentials, flags=flags,
             options=options)
@@ -61,6 +63,7 @@ class SamDB(samba.Ldb):
     def connect(self, url=None, flags=0, options=None):
         if self.lp is not None:
             url = self.lp.private_path(url)
+        self.url = url
 
         super(SamDB, self).connect(url=url, flags=flags,
                 options=options)