X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=service-type-database%2Fbuild-db.in;h=21d057d45e86755eb0abec3f4f2776ddde90c830;hb=75caf1cfade7e6b6e43079c79b771532007d1002;hp=c27eb90b6215ab83702658a810c24135db7f32c0;hpb=ec27d6612430992e3524901d5ac9113169822ab6;p=catta 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")