46 lines
1.3 KiB
Diff
46 lines
1.3 KiB
Diff
|
--- axiom/_pysqlite2.py 2006-07-05 18:31:18.000000000 +0300
|
||
|
+++ axiom/_pysqlite2.py 2007-11-02 05:10:45.000000000 +0200
|
||
|
@@ -8,7 +8,11 @@
|
||
|
"""
|
||
|
import time
|
||
|
|
||
|
-from pysqlite2 import dbapi2
|
||
|
+# Use python2.5's sqlite3 if avaliable
|
||
|
+try:
|
||
|
+ from sqlite3 import dbapi2
|
||
|
+except:
|
||
|
+ from pysqlite2 import dbapi2
|
||
|
|
||
|
from twisted.python import log
|
||
|
|
||
|
--- axiom/test/test_pysqlite2.py 2006-07-02 19:23:40.000000000 +0300
|
||
|
+++ axiom/test/test_pysqlite2.py 2007-11-02 05:39:44.000000000 +0200
|
||
|
@@ -2,7 +2,11 @@
|
||
|
Test cases for PySQLite2-specific parts of the backend.
|
||
|
"""
|
||
|
|
||
|
-from pysqlite2.dbapi2 import OperationalError
|
||
|
+# Use python2.5's sqlite3 if avaliable
|
||
|
+try:
|
||
|
+ from sqlite3.dbapi2 import OperationalError
|
||
|
+except:
|
||
|
+ from pysqlite2.dbapi2 import OperationalError
|
||
|
|
||
|
from twisted.trial.unittest import TestCase
|
||
|
|
||
|
--- axiom/test/test_xatop.py 2007-02-23 02:09:19.000000000 +0200
|
||
|
+++ axiom/test/test_xatop.py 2007-11-02 05:38:48.000000000 +0200
|
||
|
@@ -9,7 +9,11 @@
|
||
|
from axiom import attributes, item, store, errors
|
||
|
from axiom.errors import ItemNotFound
|
||
|
|
||
|
-from pysqlite2.dbapi2 import sqlite_version_info
|
||
|
+# Use python2.5's sqlite3 if avaliable
|
||
|
+try:
|
||
|
+ from sqlite3.dbapi2 import sqlite_version_info
|
||
|
+except:
|
||
|
+ from pysqlite2.dbapi2 import sqlite_version_info
|
||
|
|
||
|
|
||
|
class RevertException(Exception):
|