diff options
Diffstat (limited to 'source4')
-rw-r--r-- | source4/scripting/python/samba/provision.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/source4/scripting/python/samba/provision.py b/source4/scripting/python/samba/provision.py index 5da073c563..95bff74e75 100644 --- a/source4/scripting/python/samba/provision.py +++ b/source4/scripting/python/samba/provision.py @@ -432,17 +432,18 @@ def setup_samdb_partitions(samdb_path, setup_path, message, lp, session_info, """ assert session_info is not None - samdb = SamDB(samdb_path, session_info=session_info, - credentials=credentials, lp=lp) - - # Wipes the database try: + samdb = SamDB(samdb_path, session_info=session_info, + credentials=credentials, lp=lp) + # Wipes the database samdb.erase() except: os.unlink(samdb_path) - - samdb = SamDB(samdb_path, session_info=session_info, - credentials=credentials, lp=lp) + samdb = SamDB(samdb_path, session_info=session_info, + credentials=credentials, lp=lp) + # Wipes the database + samdb.erase() + #Add modules to the list to activate them by default #beware often order is important |