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

python: Remove ntdb references

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Volker Lendecke
2015-03-12 13:27:49 +00:00
committed by Michael Adam
parent 334015ebca
commit 9fbc2e5018
2 changed files with 2 additions and 9 deletions

View File

@ -25,7 +25,6 @@ REGISTRY_DB_VERSION = 1
import os
import struct
import tdb
import ntdb
import passdb
import param as s3param
@ -50,15 +49,12 @@ def fetch_int32(db, key):
class DbDatabase(object):
"""Simple Samba 3 TDB/NTDB database reader."""
"""Simple Samba 3 TDB database reader."""
def __init__(self, file):
"""Open a file.
:param file: Path of the file to open, appending .tdb or .ntdb.
"""
if os.path.exists(file + ".ntdb"):
self.db = ntdb.Ntdb(file + ".ntdb", flags=os.O_RDONLY)
else:
self.db = tdb.Tdb(file + ".tdb", flags=os.O_RDONLY)
self._check_version()

View File

@ -57,7 +57,6 @@ class ProvisionTestCase(samba.tests.TestCaseInTempDir):
path = os.path.join(self.tempdir, "secrets.ldb")
paths = ProvisionPaths()
secrets_tdb_path = os.path.join(self.tempdir, "secrets.tdb")
secrets_ntdb_path = os.path.join(self.tempdir, "secrets.ntdb")
paths.secrets = path
paths.private_dir = os.path.dirname(path)
paths.keytab = "no.keytab"
@ -71,8 +70,6 @@ class ProvisionTestCase(samba.tests.TestCaseInTempDir):
os.unlink(path)
if os.path.exists(secrets_tdb_path):
os.unlink(secrets_tdb_path)
if os.path.exists(secrets_ntdb_path):
os.unlink(secrets_ntdb_path)
class FindNssTests(TestCase):
"""Test findnss() function."""