Author: reinhard Date: 2010-12-16 15:33:59 -0600 (Thu, 16 Dec 2010) New Revision: 10274
Modified: trunk/gnue-common/ trunk/gnue-common/src/datasources/GConnections.py trunk/gnue-common/src/datasources/drivers/sql/interbase/kinterbasdbdrv.py trunk/gnue-common/src/datasources/drivers/sql/maxdb/maxdbdrv.py trunk/gnue-common/src/datasources/drivers/sql/msado/adodbapidrv.py trunk/gnue-common/src/datasources/drivers/sql/mysql/mysqldbdrv.py trunk/gnue-common/src/datasources/drivers/sql/oracle/cxoracledrv.py trunk/gnue-common/src/datasources/drivers/sql/oracle/dcoracledrv.py trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopg2drv.py trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopgdrv.py trunk/gnue-common/src/datasources/drivers/sql/postgresql/pygresqldrv.py trunk/gnue-common/src/datasources/drivers/sql/postgresql/pypgsqldrv.py trunk/gnue-common/src/datasources/drivers/sql/sqlite2/pysqlitedrv.py trunk/gnue-common/src/datasources/drivers/sql/sqlite3/pysqlite2drv.py trunk/gnue-common/src/datasources/drivers/sql/sqlite3/sqlite3drv.py Log: Don't mask import errors for DBSIG2 modules, since this hides away potential info about why the module could not be imported. Property changes on: trunk/gnue-common ___________________________________________________________________ Name: bzr:revision-info - timestamp: 2010-12-16 22:21:53.016000032 +0100 committer: Reinhard Müller <reinhard.muel...@bytewise.at> properties: branch-nick: common + timestamp: 2010-12-16 22:31:28.948999882 +0100 committer: Reinhard Müller <reinhard.muel...@bytewise.at> properties: branch-nick: common Name: bzr:file-ids - src/base/plugin.py 9...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fbase%2Fplugin.py + src/datasources/GConnections.py 1...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2FGConnections.py src/datasources/drivers/sql/interbase/kinterbasdbdrv.py 7...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2Fsql%2Finterbase%2Fkinterbasdbdrv.py src/datasources/drivers/sql/maxdb/maxdbdrv.py 7...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2Fsql%2Fmaxdb%2Fmaxdbdrv.py src/datasources/drivers/sql/msado/adodbapidrv.py 7...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2Fsql%2Fmsado%2Fadodbapidrv.py src/datasources/drivers/sql/mysql/mysqldbdrv.py 7...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2Fsql%2Fmysql%2Fmysqldbdrv.py src/datasources/drivers/sql/oracle/cxoracledrv.py 7...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2Fsql%2Foracle%2Fcxoracledrv.py src/datasources/drivers/sql/oracle/dcoracledrv.py 7...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2Fsql%2Foracle%2Fdcoracledrv.py src/datasources/drivers/sql/postgresql/psycopg2drv.py 8...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2Fsql%2Fpostgresql%2Fpsycopg2drv.py src/datasources/drivers/sql/postgresql/psycopgdrv.py 7...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2Fsql%2Fpostgresql%2Fpsycopgdrv.py src/datasources/drivers/sql/postgresql/pygresqldrv.py 7...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2Fsql%2Fpostgresql%2Fpygresqldrv.py src/datasources/drivers/sql/postgresql/pypgsqldrv.py 7...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2Fsql%2Fpostgresql%2Fpypgsqldrv.py src/datasources/drivers/sql/sqlite2/pysqlitedrv.py 7...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2Fsql%2Fsqlite2%2Fpysqlitedrv.py src/datasources/drivers/sql/sqlite3/pysqlite2drv.py 7...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2Fsql%2Fsqlite3%2Fpysqlite2drv.py src/datasources/drivers/sql/sqlite3/sqlite3drv.py 9...@3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:src%2Fdatasources%2Fdrivers%2Fsql%2Fsqlite3%2Fsqlite3drv.py Name: bzr:revision-id:v4 - 3116 reinhard.muel...@bytewise.at-20100426083315-ccfwx2pihuvqn60z 3117 reinhard.muel...@bytewise.at-20100503114756-unpxm52de0towufo 3118 reinhard.muel...@bytewise.at-20100503115129-uvondrz5bvkqubyv 3119 reinhard.muel...@bytewise.at-20100505081835-9peco6k7a2le0mvg 3120 reinhard.muel...@bytewise.at-20100505084742-wn5vtc4a129z8g28 3121 reinhard.muel...@bytewise.at-20100505092131-m2avvsci5w6aj0rv 3122 reinhard.muel...@bytewise.at-20100519151545-pybk8q2s234vzsf2 3123 reinhard.muel...@bytewise.at-20100525101023-xs7k6pkghh9t6fc3 3124 reinhard.muel...@bytewise.at-20100525114015-rj7eb0xdheqkcuql 3125 reinhard.muel...@bytewise.at-20100525145035-j177jbvu10me4mfp 3126 reinhard.muel...@bytewise.at-20100526111738-ic0wot9z1ulg2y1a 3127 reinhard.muel...@bytewise.at-20100612121357-1nf23tuj1tveh1lv 3128 reinhard.muel...@bytewise.at-20100929190642-6pp6cwlicgt2bhhs 3129 reinhard.muel...@bytewise.at-20100929190817-bje4kkvrjrpanut1 3130 reinhard.muel...@bytewise.at-20101016191602-kceb6hdjytt4im93 3131 reinhard.muel...@bytewise.at-20101020175112-o65lqy8lejjrvzaz 3132 reinhard.muel...@bytewise.at-20101020195535-gb2bt2h80mu5j5h4 3133 reinhard.muel...@bytewise.at-20101020203525-nvdwy7b9r84bngco 3134 reinhard.muel...@bytewise.at-20101028150844-49qu2auedxl5b5kv 3135 reinhard.muel...@bytewise.at-20101028152619-p6ytgkke9zw38o7a 3136 reinhard.muel...@bytewise.at-20101102085744-sfxbu24ep3nwxixc 3137 reinhard.muel...@bytewise.at-20101102085857-sgtswbhhj0baf9d7 3138 reinhard.muel...@bytewise.at-20101103071215-929sbj5boj2wcxuu 3139 reinhard.muel...@bytewise.at-20101114130053-ueyx4ilszsilw6hc 3140 reinhard.muel...@bytewise.at-20101114183532-h66yegryl7hcen0f 3141 reinhard.muel...@bytewise.at-20101130142356-cxfqmitx4trkjcja 3142 reinhard.muel...@bytewise.at-20101201235201-z7jjs7xhfmonjcni 3143 reinhard.muel...@bytewise.at-20101202213225-9hj88a0rur552boy 3144 reinhard.muel...@bytewise.at-20101202222236-g81i5zcnxr8l2q7o 3145 reinhard.muel...@bytewise.at-20101202232811-ydwqz1rwr8a17fad 3146 reinhard.muel...@bytewise.at-20101202235915-yhfdb6fvj5znz35y 3147 reinhard.muel...@bytewise.at-20101216212153-y9oprapjl2z2gnh2 + 3116 reinhard.muel...@bytewise.at-20100426083315-ccfwx2pihuvqn60z 3117 reinhard.muel...@bytewise.at-20100503114756-unpxm52de0towufo 3118 reinhard.muel...@bytewise.at-20100503115129-uvondrz5bvkqubyv 3119 reinhard.muel...@bytewise.at-20100505081835-9peco6k7a2le0mvg 3120 reinhard.muel...@bytewise.at-20100505084742-wn5vtc4a129z8g28 3121 reinhard.muel...@bytewise.at-20100505092131-m2avvsci5w6aj0rv 3122 reinhard.muel...@bytewise.at-20100519151545-pybk8q2s234vzsf2 3123 reinhard.muel...@bytewise.at-20100525101023-xs7k6pkghh9t6fc3 3124 reinhard.muel...@bytewise.at-20100525114015-rj7eb0xdheqkcuql 3125 reinhard.muel...@bytewise.at-20100525145035-j177jbvu10me4mfp 3126 reinhard.muel...@bytewise.at-20100526111738-ic0wot9z1ulg2y1a 3127 reinhard.muel...@bytewise.at-20100612121357-1nf23tuj1tveh1lv 3128 reinhard.muel...@bytewise.at-20100929190642-6pp6cwlicgt2bhhs 3129 reinhard.muel...@bytewise.at-20100929190817-bje4kkvrjrpanut1 3130 reinhard.muel...@bytewise.at-20101016191602-kceb6hdjytt4im93 3131 reinhard.muel...@bytewise.at-20101020175112-o65lqy8lejjrvzaz 3132 reinhard.muel...@bytewise.at-20101020195535-gb2bt2h80mu5j5h4 3133 reinhard.muel...@bytewise.at-20101020203525-nvdwy7b9r84bngco 3134 reinhard.muel...@bytewise.at-20101028150844-49qu2auedxl5b5kv 3135 reinhard.muel...@bytewise.at-20101028152619-p6ytgkke9zw38o7a 3136 reinhard.muel...@bytewise.at-20101102085744-sfxbu24ep3nwxixc 3137 reinhard.muel...@bytewise.at-20101102085857-sgtswbhhj0baf9d7 3138 reinhard.muel...@bytewise.at-20101103071215-929sbj5boj2wcxuu 3139 reinhard.muel...@bytewise.at-20101114130053-ueyx4ilszsilw6hc 3140 reinhard.muel...@bytewise.at-20101114183532-h66yegryl7hcen0f 3141 reinhard.muel...@bytewise.at-20101130142356-cxfqmitx4trkjcja 3142 reinhard.muel...@bytewise.at-20101201235201-z7jjs7xhfmonjcni 3143 reinhard.muel...@bytewise.at-20101202213225-9hj88a0rur552boy 3144 reinhard.muel...@bytewise.at-20101202222236-g81i5zcnxr8l2q7o 3145 reinhard.muel...@bytewise.at-20101202232811-ydwqz1rwr8a17fad 3146 reinhard.muel...@bytewise.at-20101202235915-yhfdb6fvj5znz35y 3147 reinhard.muel...@bytewise.at-20101216212153-y9oprapjl2z2gnh2 3148 reinhard.muel...@bytewise.at-20101216213128-i3zvbyb1mhx6i5jp Name: bzr:text-parents - src/base/plugin.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:10035 + src/datasources/GConnections.py reinhard.muel...@bytewise.at-20101202232811-ydwqz1rwr8a17fad src/datasources/drivers/sql/interbase/kinterbasdbdrv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 src/datasources/drivers/sql/maxdb/maxdbdrv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 src/datasources/drivers/sql/msado/adodbapidrv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 src/datasources/drivers/sql/mysql/mysqldbdrv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:10152 src/datasources/drivers/sql/oracle/cxoracledrv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 src/datasources/drivers/sql/oracle/dcoracledrv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 src/datasources/drivers/sql/postgresql/psycopg2drv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 src/datasources/drivers/sql/postgresql/psycopgdrv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 src/datasources/drivers/sql/postgresql/pygresqldrv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 src/datasources/drivers/sql/postgresql/pypgsqldrv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 src/datasources/drivers/sql/sqlite2/pysqlitedrv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 src/datasources/drivers/sql/sqlite3/pysqlite2drv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 src/datasources/drivers/sql/sqlite3/sqlite3drv.py svn-v3-single1-dHJ1bmsvZ251ZS1jb21tb24.:3a364389-8fce-0310-8f11-cc363fde16c7:trunk%2Fgnue-common:9954 Modified: trunk/gnue-common/src/datasources/GConnections.py =================================================================== --- trunk/gnue-common/src/datasources/GConnections.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/GConnections.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -47,22 +47,6 @@ # ----------------------------------------------------------------------------- -class DependencyError (errors.AdminError): - """ - Cannot load database driver plugin due to a missing dependency. - - This exception is raised by the database drivers. - """ - def __init__ (self, modulename, url): - self.modulename = modulename - self.url = url - message = u_("Module '%s' is not installed.") % self.modulename - if self.url: - message += u_(" You can download it from %s.") % self.url - errors.AdminError.__init__ (self, message) - -# ----------------------------------------------------------------------------- - class InvalidFormatError (errors.AdminError): """ Cannot parse connections.conf file. Modified: trunk/gnue-common/src/datasources/drivers/sql/interbase/kinterbasdbdrv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/interbase/kinterbasdbdrv.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/drivers/sql/interbase/kinterbasdbdrv.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -39,14 +39,9 @@ # ============================================================================= def __initplugin__ (): - from gnue.common.datasources import GConnections - try: - import kinterbasdb + import kinterbasdb - except ImportError: - raise GConnections.DependencyError, ('kinterbasdb', None) - # ============================================================================= # Driver info # ============================================================================= Modified: trunk/gnue-common/src/datasources/drivers/sql/maxdb/maxdbdrv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/maxdb/maxdbdrv.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/drivers/sql/maxdb/maxdbdrv.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -38,14 +38,9 @@ # ============================================================================= def __initplugin__ (): - from gnue.common.datasources import GConnections - try: - import sapdb.dbapi + import sapdb.dbapi - except ImportError: - raise GConnections.DependencyError, ('sapdb', None) - # ============================================================================= # Driver info # ============================================================================= Modified: trunk/gnue-common/src/datasources/drivers/sql/msado/adodbapidrv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/msado/adodbapidrv.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/drivers/sql/msado/adodbapidrv.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -36,15 +36,8 @@ # ============================================================================= def __initplugin__ (): - from gnue.common.datasources import GConnections - try: - import adodbapi - except ImportError: - raise GConnections.DependencyError, ('adodbapi', None) - try: - import win32com - except ImportError: - raise GConnections.DependencyError, ('win32com', None) + import adodbapi + import win32com # ============================================================================= Modified: trunk/gnue-common/src/datasources/drivers/sql/mysql/mysqldbdrv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/mysql/mysqldbdrv.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/drivers/sql/mysql/mysqldbdrv.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -38,12 +38,7 @@ # ============================================================================= def __initplugin__ (): - from gnue.common.datasources import GConnections - try: - import MySQLdb - except ImportError: - raise GConnections.DependencyError ('mysql-python', - 'http://sourceforge.net/projects/mysql-python') + import MySQLdb # ============================================================================= Modified: trunk/gnue-common/src/datasources/drivers/sql/oracle/cxoracledrv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/oracle/cxoracledrv.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/drivers/sql/oracle/cxoracledrv.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -37,11 +37,7 @@ # ============================================================================= def __initplugin__ (): - from gnue.common.datasources import GConnections - try: - import cx_Oracle - except ImportError: - raise GConnections.DependencyError, ('cx_Oracle', None) + import cx_Oracle # ============================================================================= Modified: trunk/gnue-common/src/datasources/drivers/sql/oracle/dcoracledrv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/oracle/dcoracledrv.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/drivers/sql/oracle/dcoracledrv.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -37,11 +37,7 @@ # ============================================================================= def __initplugin__ (): - from gnue.common.datasources import GConnections - try: - import DCOracle2 - except ImportError: - raise GConnections.DependencyError ('DCOracle2', None) + import DCOracle2 # ============================================================================= Modified: trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopg2drv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopg2drv.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopg2drv.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -37,11 +37,7 @@ # ============================================================================= def __initplugin__ (): - from gnue.common.datasources import GConnections - try: - import psycopg2 - except: - raise GConnections.DependencyError, ('psycopg2', None) + import psycopg2 # ============================================================================= Modified: trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopgdrv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopgdrv.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/drivers/sql/postgresql/psycopgdrv.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -37,11 +37,7 @@ # ============================================================================= def __initplugin__ (): - from gnue.common.datasources import GConnections - try: - import psycopg - except: - raise GConnections.DependencyError, ('psycopg', None) + import psycopg # ============================================================================= Modified: trunk/gnue-common/src/datasources/drivers/sql/postgresql/pygresqldrv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/postgresql/pygresqldrv.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/drivers/sql/postgresql/pygresqldrv.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -38,11 +38,7 @@ # ============================================================================= def __initplugin__ (): - from gnue.common.datasources import GConnections - try: - import pgdb - except ImportError: - raise GConnections.DependencyError, ('pygresql', None) + import pgdb # ============================================================================= Modified: trunk/gnue-common/src/datasources/drivers/sql/postgresql/pypgsqldrv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/postgresql/pypgsqldrv.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/drivers/sql/postgresql/pypgsqldrv.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -37,11 +37,7 @@ # ============================================================================= def __initplugin__ (): - from gnue.common.datasources import GConnections - try: - from pyPgSQL import PgSQL - except: - raise GConnections.DependencyError, ('pyPgSQL', None) + from pyPgSQL import PgSQL # ============================================================================= Modified: trunk/gnue-common/src/datasources/drivers/sql/sqlite2/pysqlitedrv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/sqlite2/pysqlitedrv.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/drivers/sql/sqlite2/pysqlitedrv.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -36,25 +36,20 @@ # ============================================================================= def __initplugin__ (): - from gnue.common.datasources import GConnections - try: - import sqlite - - # This is a workaround for a bug in PySQLite. All the following mebers are - # not imported from main.py in __init__.py - if not hasattr (sqlite, 'Timestamp') and sqlite.main.have_datetime: - sqlite.Date = sqlite.main.Date - sqlite.Time = sqlite.main.Time - sqlite.Timestamp = sqlite.main.Timestamp - sqlite.DateFromTicks = sqlite.main.DateFromTicks - sqlite.TimeFromTicks = sqlite.main.TimeFromTicks - sqlite.TimestampFromTicks = sqlite.main.TimestampFromTicks + import sqlite - sqlite.DateTimeType = sqlite.main.DateTimeType - sqlite.DateTimeDeltaType = sqlite.main.DateTimeDeltaType + # This is a workaround for a bug in PySQLite. All the following mebers are + # not imported from main.py in __init__.py + if not hasattr (sqlite, 'Timestamp') and sqlite.main.have_datetime: + sqlite.Date = sqlite.main.Date + sqlite.Time = sqlite.main.Time + sqlite.Timestamp = sqlite.main.Timestamp + sqlite.DateFromTicks = sqlite.main.DateFromTicks + sqlite.TimeFromTicks = sqlite.main.TimeFromTicks + sqlite.TimestampFromTicks = sqlite.main.TimestampFromTicks - except ImportError: - raise GConnections.DependencyError, ('SQLitedbapi', None) + sqlite.DateTimeType = sqlite.main.DateTimeType + sqlite.DateTimeDeltaType = sqlite.main.DateTimeDeltaType # ============================================================================= Modified: trunk/gnue-common/src/datasources/drivers/sql/sqlite3/pysqlite2drv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/sqlite3/pysqlite2drv.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/drivers/sql/sqlite3/pysqlite2drv.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -37,12 +37,7 @@ # ============================================================================= def __initplugin__ (): - from gnue.common.datasources import GConnections - try: - from pysqlite2 import dbapi2 - - except ImportError: - raise GConnections.DependencyError, ('pysqlite2.dbapi2', None) + from pysqlite2 import dbapi2 # ============================================================================= Modified: trunk/gnue-common/src/datasources/drivers/sql/sqlite3/sqlite3drv.py =================================================================== --- trunk/gnue-common/src/datasources/drivers/sql/sqlite3/sqlite3drv.py 2010-12-16 21:22:17 UTC (rev 10273) +++ trunk/gnue-common/src/datasources/drivers/sql/sqlite3/sqlite3drv.py 2010-12-16 21:33:59 UTC (rev 10274) @@ -38,12 +38,7 @@ # ============================================================================= def __initplugin__ (): - from gnue.common.datasources import GConnections - try: - # Python >= 2.5 has sqlite3 package in the standard library - from sqlite3 import dbapi2 - except ImportError: - raise GConnections.DependencyError, ('sqlite3.dbapi2', None) + from sqlite3 import dbapi2 # ============================================================================= _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org http://lists.gnu.org/mailman/listinfo/commit-gnue