From 59b210430f9f3a8461cc8122bd21d35d5691a9a7 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Sun, 11 Mar 2012 02:53:15 +0000 Subject: Use gdbm module directly instead of whacky anydb module. svn path=/trunk/; revision=4394 --- scripts/analyze-rcynic-history.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'scripts/analyze-rcynic-history.py') diff --git a/scripts/analyze-rcynic-history.py b/scripts/analyze-rcynic-history.py index 6e8d3598..fd254d2f 100644 --- a/scripts/analyze-rcynic-history.py +++ b/scripts/analyze-rcynic-history.py @@ -32,7 +32,7 @@ import getopt import datetime import subprocess import shelve -import whichdb +import gdbm from xml.etree.cElementTree import (ElementTree as ElementTree, fromstring as ElementTreeFromString) @@ -210,13 +210,7 @@ def plot_one(hostnames, fields): mb = mailbox.Maildir("/u/sra/rpki/rcynic-xml", factory = None, create = False) -gdbm_file = "rcynic-xml.gdbm" - -# Disgusting workaround for dumb bug, see http://bugs.python.org/issue13007 -if whichdb.whichdb(gdbm_file) == "": - whichdb.whichdb = lambda filename: "gdbm" - -shelf = shelve.open(gdbm_file) +shelf = shelve.Shelf(gdbm.open("rcynic-xml.gdbm", "c")) sessions = [] -- cgit v1.2.3