[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/common/src/dbdrivers _dbsig/DBdriver.py ap...
From: |
Arturas Kriukovas |
Subject: |
gnue/common/src/dbdrivers _dbsig/DBdriver.py ap... |
Date: |
Sat, 18 Jan 2003 10:09:43 -0500 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Arturas Kriukovas <address@hidden> 03/01/18 10:09:42
Modified files:
common/src/dbdrivers/_dbsig: DBdriver.py
common/src/dbdrivers/appserver: DBdriver.py
common/src/dbdrivers/configfile: DBdriver.py
common/src/dbdrivers/cxoracle: DBdriver.py
common/src/dbdrivers/db2: DBdriver.py
common/src/dbdrivers/dbf: DBdriver.py
common/src/dbdrivers/geas: DBdriver.py
common/src/dbdrivers/informix: DBdriver.py
common/src/dbdrivers/ingres: DBdriver.py
common/src/dbdrivers/interbase: DBdriver.py
common/src/dbdrivers/msado: DBdriver.py
common/src/dbdrivers/mxodbc: DBdriver.py
common/src/dbdrivers/odbc: DBdriver.py
common/src/dbdrivers/oracle: DBdriver.py
common/src/dbdrivers/postgresql: DBdriver.py
common/src/dbdrivers/sapdb: DBdriver.py
common/src/dbdrivers/sqlite: DBdriver.py
common/src/dbdrivers/sqlrelay: DBdriver.py
common/src/dbdrivers/sybase: DBdriver.py
Log message:
i18n changes: raise _(msg) to tmsg = _(msg); raise tmsg
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/_dbsig/DBdriver.py.diff?tr1=1.64&tr2=1.65&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/appserver/DBdriver.py.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/configfile/DBdriver.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/cxoracle/DBdriver.py.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/db2/DBdriver.py.diff?tr1=1.15&tr2=1.16&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/dbf/DBdriver.py.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/geas/DBdriver.py.diff?tr1=1.27&tr2=1.28&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/informix/DBdriver.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/ingres/DBdriver.py.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/interbase/DBdriver.py.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/msado/DBdriver.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/mxodbc/DBdriver.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/odbc/DBdriver.py.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/oracle/DBdriver.py.diff?tr1=1.19&tr2=1.20&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/postgresql/DBdriver.py.diff?tr1=1.35&tr2=1.36&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/sapdb/DBdriver.py.diff?tr1=1.13&tr2=1.14&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/sqlite/DBdriver.py.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/sqlrelay/DBdriver.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/common/src/dbdrivers/sybase/DBdriver.py.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
Patches:
Index: gnue/common/src/dbdrivers/_dbsig/DBdriver.py
diff -c gnue/common/src/dbdrivers/_dbsig/DBdriver.py:1.64
gnue/common/src/dbdrivers/_dbsig/DBdriver.py:1.65
*** gnue/common/src/dbdrivers/_dbsig/DBdriver.py:1.64 Wed Jan 1 19:45:43 2003
--- gnue/common/src/dbdrivers/_dbsig/DBdriver.py Sat Jan 18 10:09:41 2003
***************
*** 376,388 ****
result[1] == 'NULL':
otype = "__is%s" % otype
if len(result) < self.conditionElements[otype][0]:
! raise GConditions.ConditionError, \
! _('Condition element "%s" expects at least %s arguments; found
%s') % \
! (otype, self.conditionElements[otype][0], len(result))
if len(result) > self.conditionElements[otype][1]:
! raise GConditions.ConditionError, \
! _('Condition element "%s" expects at most %s arguments; found
%s') % \
(otype, self.conditionElements[otype][0], len(result))
if self.conditionElements[otype][3] == None:
return self.conditionElements[otype][2] % tuple(result)
--- 376,387 ----
result[1] == 'NULL':
otype = "__is%s" % otype
if len(result) < self.conditionElements[otype][0]:
! tmsg = _('Condition element "%s" expects at least %s arguments;
found %s') % \
! raise GConditions.ConditionError, tmsg
if len(result) > self.conditionElements[otype][1]:
! tmsg = _('Condition element "%s" expects at most %s arguments;
found %s') % \
(otype, self.conditionElements[otype][0], len(result))
+ raise GConditions.ConditionError, tmsg
if self.conditionElements[otype][3] == None:
return self.conditionElements[otype][2] % tuple(result)
***************
*** 390,397 ****
return self.conditionElements[otype][2] % \
(string.join(result, self.conditionElements[otype][3]))
else:
! raise GConditions.ConditionNotSupported, \
! _('Condition clause "%s" is not supported by this db driver.') %
otype
# Code necessary to force the connection into transaction mode...
# this is usually not necessary (MySQL is one of few DBs that must force)
--- 389,396 ----
return self.conditionElements[otype][2] % \
(string.join(result, self.conditionElements[otype][3]))
else:
! tmsg = _('Condition clause "%s" is not supported by this db driver.')
% otype
! raise GConditions.ConditionNotSupported, tmsg
# Code necessary to force the connection into transaction mode...
# this is usually not necessary (MySQL is one of few DBs that must force)
***************
*** 404,411 ****
sql="%s %s" % (field.name,
self.schema2nativeTypes[field.type])
except:
! raise GDataObjects.DataTypeNotAvailable, \
! "Datatype '%s' is not supported by database"
if hasattr(field,"size"):
sql=sql+"(%s)" % field.size
--- 403,410 ----
sql="%s %s" % (field.name,
self.schema2nativeTypes[field.type])
except:
! tmsg = _("Datatype '%s' is not supported by database")
! raise GDataObjects.DataTypeNotAvailable, tmsg
if hasattr(field,"size"):
sql=sql+"(%s)" % field.size
Index: gnue/common/src/dbdrivers/appserver/DBdriver.py
diff -c gnue/common/src/dbdrivers/appserver/DBdriver.py:1.9
gnue/common/src/dbdrivers/appserver/DBdriver.py:1.10
*** gnue/common/src/dbdrivers/appserver/DBdriver.py:1.9 Wed Jan 1 19:45:43 2003
--- gnue/common/src/dbdrivers/appserver/DBdriver.py Sat Jan 18 10:09:41 2003
***************
*** 234,240 ****
# TODO: (jcater) allowBlankLogin = [0|1]
if not self._session.login(user,passwd):
# self._session.close()
! raise GDataObjects.ConnectionError, "Error loging into appserver"
else:
# TODO: (jcater) The GEAS docs say this is not supported and
--- 234,241 ----
# TODO: (jcater) allowBlankLogin = [0|1]
if not self._session.login(user,passwd):
# self._session.close()
! tmsg = _("Error loging into appserver")
! raise GDataObjects.ConnectionError, tmsg
else:
# TODO: (jcater) The GEAS docs say this is not supported and
***************
*** 245,256 ****
# TODO: (jcater) supplied to it.)
if not self._session.login(user,passwd):
# self._session.close()
! raise GDataObjects.ConnectionError, "Error loging into appserver"
self.triggerExtensions = GEASv2_TriggerExtensions(self._session)
except:
! raise GDataObjects.ConnectionError, "Error loging into appserver"
--- 246,259 ----
# TODO: (jcater) supplied to it.)
if not self._session.login(user,passwd):
# self._session.close()
! tmsg = _("Error loging into appserver")
! raise GDataObjects.ConnectionError, tmsg
self.triggerExtensions = GEASv2_TriggerExtensions(self._session)
except:
! tmsg = _("Error loging into appserver")
! raise GDataObjects.ConnectionError, tmsg
***************
*** 295,301 ****
try:
self._list = self._session.createList (self.table)
except:
! raise GDataObjects.ConnectionError, "Error during creation of object
list"
GDebug.printMesg (5,"Setting up list object ...");
--- 298,305 ----
try:
self._list = self._session.createList (self.table)
except:
! tmsg = _("Error during creation of object list")
! raise GDataObjects.ConnectionError, tmsg
GDebug.printMesg (5,"Setting up list object ...");
***************
*** 343,349 ****
# at the moment there is only rollback on session layer
self._session.rollback()
except:
! raise GDataObjects.ConnectionError, "Error during Rollback"
### The folowing methods are not working and just copies from the old geas
### driver
--- 347,354 ----
# at the moment there is only rollback on session layer
self._session.rollback()
except:
! tmsg = _("Error during Rollback")
! raise GDataObjects.ConnectionError, tmsg
### The folowing methods are not working and just copies from the old geas
### driver
Index: gnue/common/src/dbdrivers/configfile/DBdriver.py
diff -c gnue/common/src/dbdrivers/configfile/DBdriver.py:1.4
gnue/common/src/dbdrivers/configfile/DBdriver.py:1.5
*** gnue/common/src/dbdrivers/configfile/DBdriver.py:1.4 Wed Jan 1
19:45:43 2003
--- gnue/common/src/dbdrivers/configfile/DBdriver.py Sat Jan 18 10:09:41 2003
***************
*** 79,91 ****
# check if name already exists
if section in dataCon.sections():
! raise Configfile_Error,"The section name you have provided for"+\
! " this record already exists."
# check if name is empty
if len(section)<1:
! raise Configfile_Error,"You have to provide a section name for"+\
! " this record!"
dataCon.add_section(section)
--- 79,91 ----
# check if name already exists
if section in dataCon.sections():
! tmsg = _("The section name you have provided for this record already
exists.")
! raise Configfile_Error, tmsg
# check if name is empty
if len(section)<1:
! tmsg = _("You have to provide a section name for this record!")
! raise Configfile_Error, tmsg
dataCon.add_section(section)
***************
*** 100,112 ****
# check if name already exists
if newsection in dataCon.sections():
! raise Configfile_Error,"The section name you have provided for"+\
! " this record already exists."
# check if name is empty
if len(newsection)<1:
! raise Configfile_Error,"You have to provide a section name for"+\
! " this record!"
# add new section
dataCon.add_section(newsection)
--- 100,113 ----
# check if name already exists
if newsection in dataCon.sections():
! tmsg = _("The section name you have provided for this record
already exists.")
! raise Configfile_Error, tmsg
# check if name is empty
+
if len(newsection)<1:
! tmsg = _("You have to provide a section name for this record!")
! raise Configfile_Error, tmsg
# add new section
dataCon.add_section(newsection)
***************
*** 274,280 ****
file.close()
except:
! raise GDataObjects.ConnectionError, "Error opening config file %s" %
self._filename
self.triggerExtensions = TriggerExtensions(self._dataConnection)
--- 275,282 ----
file.close()
except:
! tmsg = _("Error opening config file %s") % self._filename
! raise GDataObjects.ConnectionError, tmsg
self.triggerExtensions = TriggerExtensions(self._dataConnection)
***************
*** 296,304 ****
masterRecordSet=None,sql=""):
if conditions!=None:
! raise GDataObjects.ConnectionError, "This database driver always
shows"+\
! " all sections of a config file. You cannot execute querys on it."
!
result=[]
for section in self._dataConnection.sections():
record={"_section_name":section}
--- 298,306 ----
masterRecordSet=None,sql=""):
if conditions!=None:
! tmsg = _("This database driver always shows all sections\
! of a config file. You cannot execute querys on it.")
! raise GDataObjects.ConnectionError, tmsg
result=[]
for section in self._dataConnection.sections():
record={"_section_name":section}
Index: gnue/common/src/dbdrivers/cxoracle/DBdriver.py
diff -c gnue/common/src/dbdrivers/cxoracle/DBdriver.py:1.15
gnue/common/src/dbdrivers/cxoracle/DBdriver.py:1.16
*** gnue/common/src/dbdrivers/cxoracle/DBdriver.py:1.15 Wed Jan 1 19:45:43 2003
--- gnue/common/src/dbdrivers/cxoracle/DBdriver.py Sat Jan 18 10:09:41 2003
***************
*** 43,50 ****
try:
import cx_Oracle as SIG2api
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: cx_Oracle for Oracle 8.x [%s]") % message
class Oracle_RecordSet(DBSIG_RecordSet):
--- 43,50 ----
try:
import cx_Oracle as SIG2api
except ImportError, message:
! tmsg = _("Driver not installed: cx_Oracle for Oracle 8.x [%s]") % message
! raise GConnections.AdapterNotInstalled, tmsg
class Oracle_RecordSet(DBSIG_RecordSet):
Index: gnue/common/src/dbdrivers/db2/DBdriver.py
diff -c gnue/common/src/dbdrivers/db2/DBdriver.py:1.15
gnue/common/src/dbdrivers/db2/DBdriver.py:1.16
*** gnue/common/src/dbdrivers/db2/DBdriver.py:1.15 Wed Jan 1 19:45:43 2003
--- gnue/common/src/dbdrivers/db2/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 46,53 ****
try:
import DB2
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: db2 for DB2 [%s]") % message
class DB2_RecordSet(DBSIG_RecordSet):
--- 46,53 ----
try:
import DB2
except ImportError, message:
! tmsg = _("Driver not installed: db2 for DB2 [%s]") % message
! raise GConnections.AdapterNotInstalled, tmsg
class DB2_RecordSet(DBSIG_RecordSet):
Index: gnue/common/src/dbdrivers/dbf/DBdriver.py
diff -c gnue/common/src/dbdrivers/dbf/DBdriver.py:1.4
gnue/common/src/dbdrivers/dbf/DBdriver.py:1.5
*** gnue/common/src/dbdrivers/dbf/DBdriver.py:1.4 Wed Jan 1 19:45:43 2003
--- gnue/common/src/dbdrivers/dbf/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 58,66 ****
self._dataConnection = dbf.dbf(connectData['directory']+\
connectData['dbname'])
except IOError:
! raise self._DatabaseError,'DBF file not found.'
except TypeError:
! raise self._DatabaseError,'Wrong file format.'
# build field list
self._fieldReferences=[]
--- 58,68 ----
self._dataConnection = dbf.dbf(connectData['directory']+\
connectData['dbname'])
except IOError:
! tmsg = _('DBF file not found.')
! raise self._DatabaseError, tmsg
except TypeError:
! tmsg = _('Wrong file format.')
! raise self._DatabaseError, tmsg
# build field list
self._fieldReferences=[]
Index: gnue/common/src/dbdrivers/geas/DBdriver.py
diff -c gnue/common/src/dbdrivers/geas/DBdriver.py:1.27
gnue/common/src/dbdrivers/geas/DBdriver.py:1.28
*** gnue/common/src/dbdrivers/geas/DBdriver.py:1.27 Wed Jan 1 19:45:43 2003
--- gnue/common/src/dbdrivers/geas/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 144,150 ****
self.ior =
open(gConfig('GEASDIR')+"/var/run/geas-server.ior").readline()
except (IOError), ex:
GDebug.printMesg(1, "*** Error: ior file for geas was not found... is
geas running?")
! raise GDataObjects.LoginError, _('Unable to connect to GEAS. Is it
running?')
self._factory = self.orb.string_to_object(self.ior)
try:
--- 144,151 ----
self.ior =
open(gConfig('GEASDIR')+"/var/run/geas-server.ior").readline()
except (IOError), ex:
GDebug.printMesg(1, "*** Error: ior file for geas was not found... is
geas running?")
! tmsg = _('Unable to connect to GEAS. Is it running?')
! raise GDataObjects.LoginError, tmsg
self._factory = self.orb.string_to_object(self.ior)
try:
***************
*** 230,250 ****
for i in range(0, len(conditionTree._children)):
conditionTree._children[i] =
self.__conditionToGEASQuery(queryObject,conditionTree._children[i])
if len(conditionTree._children) <
self.conditionElements[otype][0]:
! raise GConditions.ConditionError, \
! _('Condition element "%s" expects at least %s
arguments; found %s') % \
! (otype, self.conditionElements[otype][0],
len(conditionTree._children))
if len(conditionTree._children) >
self.conditionElements[otype][1]:
! raise GConditions.ConditionError, \
! _('Condition element "%s" expects at most %s
arguments; found %s') % \
! (otype, self.conditionElements[otype][0],
len(conditionTree._children))
if self.conditionElements[otype][3] == None:
eval(self.conditionElements[otype][2] %
tuple(conditionTree._children))
else:
eval(self.conditionElements[otype][3])
# It's an unsupported condition so flag an error
else:
! raise GConditions.ConditionNotSupported, \
! _('Condition clause "%s" is not supported by this db
driver.') % otype
#print " "*count, conditionTree._type," : ",
conditionTree.getValue()
#for i in range(0, len(conditionTree._children)):
--- 231,251 ----
for i in range(0, len(conditionTree._children)):
conditionTree._children[i] =
self.__conditionToGEASQuery(queryObject,conditionTree._children[i])
if len(conditionTree._children) <
self.conditionElements[otype][0]:
! tmsg = _('Condition element "%s" expects at least %s
arguments; found %s') % \
! (otype, self.conditionElements[otype][0],
len(conditionTree._children))
! raise GConditions.ConditionError, tmsg
if len(conditionTree._children) >
self.conditionElements[otype][1]:
! tmsg = _('Condition element "%s" expects at most %s
arguments; found %s') % \
! (otype, self.conditionElements[otype][0],
len(conditionTree._children))
! raise GConditions.ConditionError, tmsg
if self.conditionElements[otype][3] == None:
eval(self.conditionElements[otype][2] %
tuple(conditionTree._children))
else:
eval(self.conditionElements[otype][3])
# It's an unsupported condition so flag an error
else:
! tmsg = _('Condition clause "%s" is not supported by this db
driver.') % otype
! raise GConditions.ConditionNotSupported, tmsg
#print " "*count, conditionTree._type," : ",
conditionTree.getValue()
#for i in range(0, len(conditionTree._children)):
Index: gnue/common/src/dbdrivers/informix/DBdriver.py
diff -c gnue/common/src/dbdrivers/informix/DBdriver.py:1.8
gnue/common/src/dbdrivers/informix/DBdriver.py:1.9
*** gnue/common/src/dbdrivers/informix/DBdriver.py:1.8 Wed Jan 1 19:45:43 2003
--- gnue/common/src/dbdrivers/informix/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 46,53 ****
try:
import informixdb as SIG2api
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: Kinfxdb for Informix [%s]") % message
class Informix_RecordSet(DBSIG_RecordSet):
--- 46,53 ----
try:
import informixdb as SIG2api
except ImportError, message:
! tmsg = _("Driver not installed: Kinfxdb for Informix [%s]") % message
! raise GConnections.AdapterNotInstalled, tmsg
class Informix_RecordSet(DBSIG_RecordSet):
Index: gnue/common/src/dbdrivers/ingres/DBdriver.py
diff -c gnue/common/src/dbdrivers/ingres/DBdriver.py:1.9
gnue/common/src/dbdrivers/ingres/DBdriver.py:1.10
*** gnue/common/src/dbdrivers/ingres/DBdriver.py:1.9 Wed Jan 1 19:45:43 2003
--- gnue/common/src/dbdrivers/ingres/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 47,54 ****
try:
import ingmod as SIG2api
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: ingmod for Ingres/Ingres II/OpenIngres
[%s]") % message
class Ingres_RecordSet(DBSIG_RecordSet):
--- 47,54 ----
try:
import ingmod as SIG2api
except ImportError, message:
! tmsg = _("Driver not installed: ingmod for Ingres/Ingres II/OpenIngres
[%s]") % message
! raise GConnections.AdapterNotInstalled, tmsg
class Ingres_RecordSet(DBSIG_RecordSet):
Index: gnue/common/src/dbdrivers/interbase/DBdriver.py
diff -c gnue/common/src/dbdrivers/interbase/DBdriver.py:1.13
gnue/common/src/dbdrivers/interbase/DBdriver.py:1.14
*** gnue/common/src/dbdrivers/interbase/DBdriver.py:1.13 Wed Jan 1
19:45:43 2003
--- gnue/common/src/dbdrivers/interbase/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 45,52 ****
try:
import kinterbasdb as SIG2api
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: Kinterbasdb for Interbase [%s]") % message
class Interbase_RecordSet(DBSIG_RecordSet):
--- 45,52 ----
try:
import kinterbasdb as SIG2api
except ImportError, message:
! tmsg = _("Driver not installed: Kinterbasdb for Interbase [%s]") % message
! raise GConnections.AdapterNotInstalled, tmsg
class Interbase_RecordSet(DBSIG_RecordSet):
Index: gnue/common/src/dbdrivers/msado/DBdriver.py
diff -c gnue/common/src/dbdrivers/msado/DBdriver.py:1.5
gnue/common/src/dbdrivers/msado/DBdriver.py:1.6
*** gnue/common/src/dbdrivers/msado/DBdriver.py:1.5 Wed Jan 1 19:45:45 2003
--- gnue/common/src/dbdrivers/msado/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 42,49 ****
try:
import win32com.client, pywintypes
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: ADO [win32all COMM drivers]\n\n[%s") %
message
--- 42,49 ----
try:
import win32com.client, pywintypes
except ImportError, message:
! tmsg = _("Driver not installed: ADO [win32all COMM drivers]\n\n[%s") %
message
! raise GConnections.AdapterNotInstalled, tmsg
***************
*** 217,237 ****
for i in range(0, len(element._children)):
element._children[i] = self.__conditionToSQL(element._children[i])
if len(element._children) < self.conditionElements[otype][0]:
! raise GConditions.ConditionError, \
! _('Condition element "%s" expects at least %s arguments; found
%s') % \
(otype, self.conditionElements[otype][0],
len(element._children))
if len(element._children) > self.conditionElements[otype][1]:
! raise GConditions.ConditionError, \
! _('Condition element "%s" expects at most %s arguments; found
%s') % \
(otype, self.conditionElements[otype][0],
len(element._children))
if self.conditionElements[otype][3] == None:
return self.conditionElements[otype][2] % tuple(element._children)
else:
return self.conditionElements[otype][2] % \
(string.join(element._children, self.conditionElements[otype][3]))
else:
! raise GConditions.ConditionNotSupported, \
! _('Condition clause "%s" is not supported by this db driver.') %
otype
# Code necessary to force the connection into transaction mode...
# this is usually not necessary (MySQL is one of few DBs that must force)
--- 217,237 ----
for i in range(0, len(element._children)):
element._children[i] = self.__conditionToSQL(element._children[i])
if len(element._children) < self.conditionElements[otype][0]:
! tmsg = _('Condition element "%s" expects at least %s arguments;
found %s') % \
(otype, self.conditionElements[otype][0],
len(element._children))
+ raise GConditions.ConditionError, tmsg
if len(element._children) > self.conditionElements[otype][1]:
! tmsg = _('Condition element "%s" expects at most %s arguments;
found %s') % \
(otype, self.conditionElements[otype][0],
len(element._children))
+ raise GConditions.ConditionError, tmsg
if self.conditionElements[otype][3] == None:
return self.conditionElements[otype][2] % tuple(element._children)
else:
return self.conditionElements[otype][2] % \
(string.join(element._children, self.conditionElements[otype][3]))
else:
! tmsg = _('Condition clause "%s" is not supported by this db driver.')
% otype
! raise GConditions.ConditionNotSupported, tmsg
# Code necessary to force the connection into transaction mode...
# this is usually not necessary (MySQL is one of few DBs that must force)
Index: gnue/common/src/dbdrivers/mxodbc/DBdriver.py
diff -c gnue/common/src/dbdrivers/mxodbc/DBdriver.py:1.7
gnue/common/src/dbdrivers/mxodbc/DBdriver.py:1.8
*** gnue/common/src/dbdrivers/mxodbc/DBdriver.py:1.7 Wed Jan 1 19:45:45 2003
--- gnue/common/src/dbdrivers/mxodbc/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 49,57 ****
# to generate an ImportError early on if not installed.
from mx import ODBC
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: ODBC\nGrab mxODBC from ") + \
"http://www.lemburg.com/files/python/mxODBC.html\n\n[%s]" % message
class ODBC_RecordSet(DBSIG_RecordSet):
--- 49,57 ----
# to generate an ImportError early on if not installed.
from mx import ODBC
except ImportError, message:
! tmsg = _("Driver not installed: ODBC\nGrab mxODBC from ") + \
"http://www.lemburg.com/files/python/mxODBC.html\n\n[%s]" % message
+ raise GConnections.AdapterNotInstalled, tmsg
class ODBC_RecordSet(DBSIG_RecordSet):
***************
*** 79,90 ****
self._backend = dyn_import("mx.ODBC.%s" % backend)
self._DatabaseError = self._backend.DatabaseError
except ValueError:
! raise GDataObjects.ConnectionError, \
! _('Invalid service string for ODBC driver.\n') +\
! _('Format: service="Backend|DSNString"')
except ImportError, mesg:
! raise GConnections.AdapterNotInstalled, \
! _('Unable to load the ODBC drivers for %s') % backend
try:
self._dataConnection = SIG2api.connect( dsn, \
--- 79,90 ----
self._backend = dyn_import("mx.ODBC.%s" % backend)
self._DatabaseError = self._backend.DatabaseError
except ValueError:
! tmsg = _('Invalid service string for ODBC driver.\n') +\
! _('Format: service="Backend|DSNString"')
! raise GDataObjects.ConnectionError, tmsg
except ImportError, mesg:
! tmsg = _('Unable to load the ODBC drivers for %s') % backend
! raise GConnections.AdapterNotInstalled, tmsg
try:
self._dataConnection = SIG2api.connect( dsn, \
Index: gnue/common/src/dbdrivers/odbc/DBdriver.py
diff -c gnue/common/src/dbdrivers/odbc/DBdriver.py:1.17
gnue/common/src/dbdrivers/odbc/DBdriver.py:1.18
*** gnue/common/src/dbdrivers/odbc/DBdriver.py:1.17 Wed Jan 1 19:45:45 2003
--- gnue/common/src/dbdrivers/odbc/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 42,49 ****
try:
import dbi, odbc
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: win32all ODBC driver\n\n[%s") % message
--- 42,49 ----
try:
import dbi, odbc
except ImportError, message:
! tmsg = _("Driver not installed: win32all ODBC driver\n\n[%s") % message
! raise GConnections.AdapterNotInstalled, tmsg
***************
*** 394,414 ****
for i in range(0, len(element._children)):
element._children[i] = self.__conditionToSQL(element._children[i])
if len(element._children) < self.conditionElements[otype][0]:
! raise GConditions.ConditionError, \
! _('Condition element "%s" expects at least %s arguments; found
%s') % \
(otype, self.conditionElements[otype][0],
len(element._children))
if len(element._children) > self.conditionElements[otype][1]:
! raise GConditions.ConditionError, \
! _('Condition element "%s" expects at most %s arguments; found
%s') % \
(otype, self.conditionElements[otype][0],
len(element._children))
if self.conditionElements[otype][3] == None:
return self.conditionElements[otype][2] % tuple(element._children)
else:
return self.conditionElements[otype][2] % \
(string.join(element._children, self.conditionElements[otype][3]))
else:
! raise GConditions.ConditionNotSupported, \
! _('Condition clause "%s" is not supported by this db driver.') %
otype
# Code necessary to force the connection into transaction mode...
# this is usually not necessary (MySQL is one of few DBs that must force)
--- 394,414 ----
for i in range(0, len(element._children)):
element._children[i] = self.__conditionToSQL(element._children[i])
if len(element._children) < self.conditionElements[otype][0]:
! tmsg = _('Condition element "%s" expects at least %s arguments;
found %s') % \
(otype, self.conditionElements[otype][0],
len(element._children))
+ raise GConditions.ConditionError, tmsg
if len(element._children) > self.conditionElements[otype][1]:
! tmsg = _('Condition element "%s" expects at most %s arguments;
found %s') % \
(otype, self.conditionElements[otype][0],
len(element._children))
+ raise GConditions.ConditionError, tmsg
if self.conditionElements[otype][3] == None:
return self.conditionElements[otype][2] % tuple(element._children)
else:
return self.conditionElements[otype][2] % \
(string.join(element._children, self.conditionElements[otype][3]))
else:
! tmsg = _('Condition clause "%s" is not supported by this db driver.')
% otype
! raise GConditions.ConditionNotSupported, tmsg
# Code necessary to force the connection into transaction mode...
# this is usually not necessary (MySQL is one of few DBs that must force)
Index: gnue/common/src/dbdrivers/oracle/DBdriver.py
diff -c gnue/common/src/dbdrivers/oracle/DBdriver.py:1.19
gnue/common/src/dbdrivers/oracle/DBdriver.py:1.20
*** gnue/common/src/dbdrivers/oracle/DBdriver.py:1.19 Wed Jan 1 19:45:45 2003
--- gnue/common/src/dbdrivers/oracle/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 44,51 ****
try:
import DCOracle2 as SIG2api
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: DCOracle2 [%s]") % message
--- 44,51 ----
try:
import DCOracle2 as SIG2api
except ImportError, message:
! tmsg = _("Driver not installed: DCOracle2 [%s]") % message
! raise GConnections.AdapterNotInstalled, tmsg
Index: gnue/common/src/dbdrivers/postgresql/DBdriver.py
diff -c gnue/common/src/dbdrivers/postgresql/DBdriver.py:1.35
gnue/common/src/dbdrivers/postgresql/DBdriver.py:1.36
*** gnue/common/src/dbdrivers/postgresql/DBdriver.py:1.35 Wed Jan 1
19:45:45 2003
--- gnue/common/src/dbdrivers/postgresql/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 39,46 ****
import pgdb
from _pg import error as PGError # This is so we can catch login errors
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: pygresql for PostgreSQL [%s]") % message
class PG_RecordSet(PGSQL_RecordSet):
pass
--- 39,46 ----
import pgdb
from _pg import error as PGError # This is so we can catch login errors
except ImportError, message:
! tmsg = _("Driver not installed: pygresql for PostgreSQL [%s]") % message
! raise GConnections.AdapterNotInstalled, tmsg
class PG_RecordSet(PGSQL_RecordSet):
pass
Index: gnue/common/src/dbdrivers/sapdb/DBdriver.py
diff -c gnue/common/src/dbdrivers/sapdb/DBdriver.py:1.13
gnue/common/src/dbdrivers/sapdb/DBdriver.py:1.14
*** gnue/common/src/dbdrivers/sapdb/DBdriver.py:1.13 Wed Jan 1 19:45:45 2003
--- gnue/common/src/dbdrivers/sapdb/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 65,72 ****
try:
import sapdbapi as SIG2api
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: sapdbapi for SAP-DB 7.x \n[%s]") % message
class SAP_RecordSet(DBSIG_RecordSet):
pass
--- 65,72 ----
try:
import sapdbapi as SIG2api
except ImportError, message:
! tmsg = _("Driver not installed: sapdbapi for SAP-DB 7.x \n[%s]") % message
! raise GConnections.AdapterNotInstalled, tmsg
class SAP_RecordSet(DBSIG_RecordSet):
pass
Index: gnue/common/src/dbdrivers/sqlite/DBdriver.py
diff -c gnue/common/src/dbdrivers/sqlite/DBdriver.py:1.5
gnue/common/src/dbdrivers/sqlite/DBdriver.py:1.6
*** gnue/common/src/dbdrivers/sqlite/DBdriver.py:1.5 Wed Jan 1 19:45:45 2003
--- gnue/common/src/dbdrivers/sqlite/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 43,50 ****
try:
import sqlite as SIG2api
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: SQLitedbapi for SQLite 7.x \n[%s]") %
message
class SQLite_RecordSet(DBSIG_RecordSet):
--- 43,50 ----
try:
import sqlite as SIG2api
except ImportError, message:
! tmsg = _("Driver not installed: SQLitedbapi for SQLite 7.x \n[%s]") %
message
! raise GConnections.AdapterNotInstalled, tmsg
class SQLite_RecordSet(DBSIG_RecordSet):
Index: gnue/common/src/dbdrivers/sqlrelay/DBdriver.py
diff -c gnue/common/src/dbdrivers/sqlrelay/DBdriver.py:1.7
gnue/common/src/dbdrivers/sqlrelay/DBdriver.py:1.8
*** gnue/common/src/dbdrivers/sqlrelay/DBdriver.py:1.7 Wed Jan 1 19:45:45 2003
--- gnue/common/src/dbdrivers/sqlrelay/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 47,54 ****
try:
from SQLRelay import PySQLRDB as SIG2api
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: SQLRelay Python API\n[%s]") % message
class SQLRelay_RecordSet(DBSIG_RecordSet):
--- 47,54 ----
try:
from SQLRelay import PySQLRDB as SIG2api
except ImportError, message:
! tmsg = _("Driver not installed: SQLRelay Python API\n[%s]") % message
! raise GConnections.AdapterNotInstalled, tmsg
class SQLRelay_RecordSet(DBSIG_RecordSet):
Index: gnue/common/src/dbdrivers/sybase/DBdriver.py
diff -c gnue/common/src/dbdrivers/sybase/DBdriver.py:1.9
gnue/common/src/dbdrivers/sybase/DBdriver.py:1.10
*** gnue/common/src/dbdrivers/sybase/DBdriver.py:1.9 Wed Jan 1 19:45:45 2003
--- gnue/common/src/dbdrivers/sybase/DBdriver.py Sat Jan 18 10:09:42 2003
***************
*** 47,54 ****
try:
import Sybase as SIG2api
except ImportError, message:
! raise GConnections.AdapterNotInstalled, \
! _("Driver not installed: Sybase.py for Sybase ASE 11.0/11.9 [%s]") %
message
class Sybase_RecordSet(DBSIG_RecordSet):
--- 47,54 ----
try:
import Sybase as SIG2api
except ImportError, message:
! tmsg = _("Driver not installed: Sybase.py for Sybase ASE 11.0/11.9 [%s]") %
message
! raise GConnections.AdapterNotInstalled, tmsg
class Sybase_RecordSet(DBSIG_RecordSet):
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/common/src/dbdrivers _dbsig/DBdriver.py ap...,
Arturas Kriukovas <=