credentials=credentials, lp=lp)
# Wipes the database
samdb.erase()
- except:
+ except LdbError:
os.unlink(samdb_path)
samdb = SamDB(samdb_path, session_info=session_info,
credentials=credentials, lp=lp)
# Wipes the database
try:
templates_ldb.erase()
- except:
+ except LdbError:
os.unlink(path)
templates_ldb.load_ldif_file_add(setup_path("provision_templates_init.ldif"))
schemadb_path = os.path.join(paths.ldapdir, "schema-tmp.ldb")
try:
os.unlink(schemadb_path)
- except:
+ except OSError:
pass
schemadb = Ldb(schemadb_path, lp=lp)