aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2007-08-25 01:24:18 +0000
committerRob Austein <sra@hactrn.net>2007-08-25 01:24:18 +0000
commitf0a151ee8f1880a416ceac8589b843b2ae4f0557 (patch)
treeea9d83bf215d797853c0e1f8071e7e1ac20eeca5
parent5e6342309f9d7a5a63ec85da94288ff8c9ebb244 (diff)
Use rpki.config
svn path=/scripts/test-sql.py; revision=910
-rw-r--r--scripts/test-sql.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/test-sql.py b/scripts/test-sql.py
index 55484d14..9d13410f 100644
--- a/scripts/test-sql.py
+++ b/scripts/test-sql.py
@@ -1,13 +1,12 @@
# $Id$
-import MySQLdb, ConfigParser
+import MySQLdb, rpki.config
def test(filename, section):
print "[Checking " + filename + "]\n"
- cfg = ConfigParser.RawConfigParser()
- cfg.read(filename)
+ cfg = rpki.config.parser(filename)
db = MySQLdb.connect(user = cfg.get(section, "username"),
db = cfg.get(section, "database"),
@@ -33,5 +32,5 @@ def test(filename, section):
print MySQLdb.Timestamp(2007,6,9,9,45,51), MySQLdb.DateFromTicks(1000), \
MySQLdb.Binary("Hi, Mom!"), MySQLdb.STRING, MySQLdb.BINARY, MySQLdb.NUMBER, MySQLdb.NULL, "\n"
-test("re.conf", "rpki")
+test("re.conf", "rpki")
test("irbe.conf", "irdb")