Code

- re-order sqlite imports to handle multiple installed versions (issue
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 27 Jul 2009 23:57:23 +0000 (23:57 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Mon, 27 Jul 2009 23:57:23 +0000 (23:57 +0000)
  2550570)

git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4336 57a73879-2fb5-44c3-a270-3262357dd7e2

CHANGES.txt
roundup/backends/back_sqlite.py

index d0b84569b12a93ff772c3531fa6baf629599423c..933a3e729f834654514551df9451b0063661041c 100644 (file)
@@ -14,6 +14,8 @@ Fixes:
   privilege, e.g., user not existing (issue 2550534)
 - fix construction of individual messages to nosy recipents with
   attachments (issue 2550568)
+- re-order sqlite imports to handle multiple installed versions (issue
+  2550570)
 
 
 2009-03-18 1.4.8 (r4209)
index c0447810777be863b1de136aa2c4761fa1723b29..59ada1a579b267cdd76ba4ad4467ebb8332759a3 100644 (file)
@@ -14,8 +14,8 @@ from roundup import hyperdb, date, password
 from roundup.backends import rdbms_common
 sqlite_version = None
 try:
-    import sqlite
-    sqlite_version = 1
+    import sqlite3 as sqlite
+    sqlite_version = 3
 except ImportError:
     try:
         from pysqlite2 import dbapi2 as sqlite
@@ -24,8 +24,8 @@ except ImportError:
                 '- %s found'%sqlite.version)
         sqlite_version = 2
     except ImportError:
-        import sqlite3 as sqlite
-        sqlite_version = 3
+        import sqlite
+        sqlite_version = 1
 
 def db_exists(config):
     return os.path.exists(os.path.join(config.DATABASE, 'db'))