Skip to content

Commit 67a57b3

Browse files
author
Richard Jones
committed
re-order sqlite imports to handle multiple installed versions (issue 2550570)
1 parent 4a44b7c commit 67a57b3

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Fixes:
1414
privilege, e.g., user not existing (issue 2550534)
1515
- fix construction of individual messages to nosy recipents with
1616
attachments (issue 2550568)
17+
- re-order sqlite imports to handle multiple installed versions (issue
18+
2550570)
1719

1820

1921
2009-03-18 1.4.8 (r4209)

roundup/backends/back_sqlite.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
from roundup.backends import rdbms_common
1515
sqlite_version = None
1616
try:
17-
import sqlite
18-
sqlite_version = 1
17+
import sqlite3 as sqlite
18+
sqlite_version = 3
1919
except ImportError:
2020
try:
2121
from pysqlite2 import dbapi2 as sqlite
@@ -24,8 +24,8 @@
2424
'- %s found'%sqlite.version)
2525
sqlite_version = 2
2626
except ImportError:
27-
import sqlite3 as sqlite
28-
sqlite_version = 3
27+
import sqlite
28+
sqlite_version = 1
2929

3030
def db_exists(config):
3131
return os.path.exists(os.path.join(config.DATABASE, 'db'))

0 commit comments

Comments
 (0)