1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-05 12:22:11 +03:00

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
This commit is contained in:
Andrew Bartlett
2009-02-18 17:44:07 +11:00
parent 0281166bb9
commit 6b8b7665bd

View File

@ -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"))