fixed the build
authorAndrew Tridgell <tridge@samba.org>
Mon, 17 Aug 2009 11:40:19 +0000 (21:40 +1000)
committerAndrew Tridgell <tridge@samba.org>
Mon, 17 Aug 2009 11:40:19 +0000 (21:40 +1000)
the changes from Matthias didn't take account of url and lp being None
in some ldb python instances in 'make test'

source4/scripting/python/samba/__init__.py

index 53795300540758e1f6e16cb59d542f3b5543811e..59a6e00c5d84c7fc28b184b1998e658d5919cc1c 100644 (file)
@@ -98,11 +98,13 @@ class Ldb(ldb.Ldb):
         glue.ldb_set_utf8_casefold(self)
 
         # Allow admins to force non-sync ldb for all databases
-        nosync_p = lp.get("nosync", "ldb")
-        if nosync_p is not None and nosync_p == true:
+        if lp is not None:
+            nosync_p = lp.get("nosync", "ldb")
+            if nosync_p is not None and nosync_p == true:
                 flags |= FLG_NOSYNC
 
-        self.connect(url, flags, options)
+        if url is not None:
+            self.connect(url, flags, options)
 
     def set_credentials(self, credentials):
         glue.ldb_set_credentials(self, credentials)