diff options
author | Rob Austein <sra@hactrn.net> | 2007-12-24 06:36:18 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2007-12-24 06:36:18 +0000 |
commit | e62cfb013638b5e68218c0702e88c6c4dfeb06f9 (patch) | |
tree | 93b5b864915a92a03e805062cf3b5b6d7f8b1e27 /scripts/test-sql.py | |
parent | 6923ec5709af6f4fa5ea8e6e9af9265f5b9e213f (diff) |
Cleanup
svn path=/scripts/Old/check-hashes.sh; revision=1434
Diffstat (limited to 'scripts/test-sql.py')
-rw-r--r-- | scripts/test-sql.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/scripts/test-sql.py b/scripts/test-sql.py deleted file mode 100644 index 6357ed42..00000000 --- a/scripts/test-sql.py +++ /dev/null @@ -1,36 +0,0 @@ -# $Id$ - -import MySQLdb, rpki.config - -def test(filename, section): - - print "[Checking " + filename + "]\n" - - cfg = rpki.config.parser(filename) - - db = MySQLdb.connect(user = cfg.get(section, "sql-username"), - db = cfg.get(section, "sql-database"), - passwd = cfg.get(section, "sql-password")) - - cur = db.cursor() - - def duh(db, cmd, header): - cur.execute(cmd) - print header - print "-" * len(header) - print cur.description - for i in cur.fetchall(): - print i[0] - print - - duh(db, "SHOW DATABASES", "Databases") - duh(db, "SELECT DATABASE()", "Current database") - duh(db, "SHOW TABLES", "Current tables") - - db.close() - -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("irbe.conf", "irdb") |