/[gnue]/gnue-common/src/datasources/drivers/mysql/mysql/Driver.py
ViewVC logotype

Diff of /gnue-common/src/datasources/drivers/mysql/mysql/Driver.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.9 by siesel, Wed Nov 5 14:56:01 2003 UTC revision 1.10 by siesel, Thu Nov 6 08:29:10 2003 UTC
# Line 116  class MySQL_DataObject(DBSIG_DataObject) Line 116  class MySQL_DataObject(DBSIG_DataObject)
116      DBSIG_DataObject.__init__(self)      DBSIG_DataObject.__init__(self)
117      self._DatabaseError = MySQLdb.DatabaseError      self._DatabaseError = MySQLdb.DatabaseError
118      self._resultSetClass = MySQL_ResultSet      self._resultSetClass = MySQL_ResultSet
119        
120    def connect(self, connectData={}):    def connect(self, connectData={}):
121      GDebug.printMesg(1,"Mysql database driver initializing")      GDebug.printMesg(1,"Mysql database driver initializing")
122      
123        # 1. just allow string type username/password 2. None -> ''
124        user   = str(connectData['_username'] or '')
125        passwd = str(connectData['_password'] or '')
126    
127      try:      try:
128        self._dataConnection = MySQLdb.connect(user=connectData['_username'],        self._dataConnection = MySQLdb.connect(user=user,
129                     passwd=connectData['_password'],                     passwd=passwd,
130                     host=connectData['host'],                     host=connectData['host'],
131                     db=connectData['dbname'])                     db=connectData['dbname'])
132      except self._DatabaseError, value:      except self._DatabaseError, value:

Legend:
Removed from v.1.9  
changed lines
  Added in v.1.10

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26