summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2009-02-18 17:44:07 +1100
committerAndrew Bartlett <abartlet@samba.org>2009-02-18 17:44:07 +1100
commit6b8b7665bdbf47e70e0d6d904c1234c03321182d (patch)
tree25dc87c3ff7972e984f57875699c2140b9c4bfba
parent0281166bb9bdf0015085b4f0a3049e7bf5036da2 (diff)
downloadsamba-6b8b7665bdbf47e70e0d6d904c1234c03321182d.tar.gz
samba-6b8b7665bdbf47e70e0d6d904c1234c03321182d.tar.bz2
samba-6b8b7665bdbf47e70e0d6d904c1234c03321182d.zip
paper over failure to reprovision with os.unlink()
We need to figure out why the deletes on the database fail, but for now doing an unlink of templates_tdb isn't too bad. Andrew Bartlett
-rw-r--r--source4/scripting/python/samba/provision.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py
index 10daf1b2b9..a5b3e8322f 100644
--- a/source4/scripting/python/samba/provision.py
+++ b/source4/scripting/python/samba/provision.py
@@ -647,7 +647,8 @@ def setup_templatesdb(path, setup_path, session_info, credentials, lp):
# Wipes the database
try:
templates_ldb.erase()
- except LdbError:
+ # This should be 'except LdbError', but on a re-provision the assert in ldb.erase fires, and we need to catch that too
+ except:
os.unlink(path)
templates_ldb.load_ldif_file_add(setup_path("provision_templates_init.ldif"))