p82 - made import of SQL interface libraries into try-except loop to facilitate choosing between mysql and pgsql

This commit is contained in:
steffen123
2008-09-16 22:19:50 +01:00
parent 092f68e259
commit cd212af029
5 changed files with 50 additions and 21 deletions
+5 -3
View File
@@ -32,12 +32,14 @@ import sys
import Configuration
import SQL
try:
# pgdb database module for posgres via DB-API
import psycopg2
import psycopg2
# pgdb uses pyformat. is that fixed or an option?
# mysql bindings
import MySQLdb
import MySQLdb
except:
pass
class Database:
def __init__(self, c, db_name, game):