From 6b8b7665bdbf47e70e0d6d904c1234c03321182d Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 18 Feb 2009 17:44:07 +1100 Subject: [PATCH] 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 --- source4/scripting/python/samba/provision.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 10daf1b2b925..a5b3e8322fae 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")) -- 2.34.1