summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--avahi-utils/avahi/ServiceTypeDatabase.py.in4
-rw-r--r--configure.ac3
-rwxr-xr-xservice-type-database/build-db.in9
3 files changed, 6 insertions, 10 deletions
diff --git a/avahi-utils/avahi/ServiceTypeDatabase.py.in b/avahi-utils/avahi/ServiceTypeDatabase.py.in
index 863c85d..9caeebd 100644
--- a/avahi-utils/avahi/ServiceTypeDatabase.py.in
+++ b/avahi-utils/avahi/ServiceTypeDatabase.py.in
@@ -19,7 +19,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
-import anydbm
+import gdbm
import locale
locale.setlocale(locale.LC_ALL, '')
@@ -28,7 +28,7 @@ class ServiceTypeDatabase:
def __init__(self, filename = "@pkgdatadir@/service-types.db"):
- self.db = anydbm.open(filename, "r")
+ self.db = gdbm.open(filename, "r")
l = locale.getlocale(locale.LC_MESSAGES)
diff --git a/configure.ac b/configure.ac
index aee779a..c9de6ae 100644
--- a/configure.ac
+++ b/configure.ac
@@ -381,8 +381,7 @@ if test "x$HAVE_PYTHON" = "xyes" ; then
fi
AM_CHECK_PYMOD(socket,,,[AC_MSG_ERROR(Could not find Python module socket)])
- AM_CHECK_PYMOD(dbm,,,[AC_MSG_ERROR(Could not find Python module dbm)])
- AM_CHECK_PYMOD(anydbm,,,[AC_MSG_ERROR(Could not find Python module anydbm)])
+ AM_CHECK_PYMOD(gdbm,,,[AC_MSG_ERROR(Could not find Python module gdbm)])
fi
AM_CONDITIONAL(HAVE_PYTHON, [test "x$HAVE_PYTHON" = "xyes" ])
AM_CONDITIONAL(HAVE_PYGTK, test "x$HAVE_PYGTK" = "xyes")
diff --git a/service-type-database/build-db.in b/service-type-database/build-db.in
index c27eb90..21d057d 100755
--- a/service-type-database/build-db.in
+++ b/service-type-database/build-db.in
@@ -19,7 +19,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.
-import dbm, sys
+import gdbm, sys
if len(sys.argv) > 1:
infn = sys.argv[1]
@@ -29,12 +29,9 @@ else:
if len(sys.argv) > 2:
outfn = sys.argv[2]
else:
- outfn = infn
+ outfn = infn + ".db"
-if outfn.endswith(".db"):
- outfn = outfn[:-3]
-
-db = dbm.open(outfn, "n")
+db = gdbm.open(outfn, "n")
for ln in file(infn, "r"):
ln = ln.strip(" \r\n\t")