p82 - made import of SQL interface libraries into try-except loop to facilitate choosing between mysql and pgsql
This commit is contained in:
+5
-3
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user