summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowitz@users.sourceforge.net>2010-06-15 20:42:12 -0500
committerOwen W. Taylor <otaylor@fishsoup.net>2010-07-01 13:55:09 -0400
commit55d8141c5e1565d5d30878d4e5b2e32ec5cd446a (patch)
tree7163e09542e2cbddbbc3392c21eeb1c6130ad7af
parent0a00eac3b1a8f7126079722f5f9bf73b8d24b501 (diff)
downloadgit-bz-55d8141c5e1565d5d30878d4e5b2e32ec5cd446a.tar.gz
Use sqlite3 module if available
Since Python 2.5, pysqlite2 has been included in the Python standard library with the name sqlite3. https://bugzilla.gnome.org/show_bug.cgi?id=621715
-rwxr-xr-xgit-bz5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-bz b/git-bz
index d362c54..8da9c7a 100755
--- a/git-bz
+++ b/git-bz
@@ -67,7 +67,10 @@ from ConfigParser import RawConfigParser, NoOptionError
import httplib
from optparse import OptionParser
import os
-from pysqlite2 import dbapi2 as sqlite
+try:
+ from sqlite3 import dbapi2 as sqlite
+except ImportError:
+ from pysqlite2 import dbapi2 as sqlite
import re
from StringIO import StringIO
from subprocess import Popen, CalledProcessError, PIPE