From 579eb979615d8b735df1d387d90266ab474fe6b6 Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 28 Mar 2011 02:27:05 +0000 Subject: [PATCH] Simplified sqlite backend ImproperlyConfigured check now that we don't support Python 2.4 git-svn-id: http://code.djangoproject.com/svn/django/trunk@15932 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/backends/sqlite3/base.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/django/db/backends/sqlite3/base.py b/django/db/backends/sqlite3/base.py index 8344bad2a0..c7f8db0a6e 100644 --- a/django/db/backends/sqlite3/base.py +++ b/django/db/backends/sqlite3/base.py @@ -1,9 +1,7 @@ """ SQLite3 backend for django. -Python 2.4 requires pysqlite2 (http://pysqlite.org/). - -Python 2.5 and later can use a pysqlite2 module or the sqlite3 module in the +Works with either the pysqlite2 module or the sqlite3 module in the standard library. """ @@ -25,14 +23,8 @@ try: except ImportError, e1: from sqlite3 import dbapi2 as Database except ImportError, exc: - import sys from django.core.exceptions import ImproperlyConfigured - if sys.version_info < (2, 5, 0): - module = 'pysqlite2 module' - exc = e1 - else: - module = 'either pysqlite2 or sqlite3 modules (tried in that order)' - raise ImproperlyConfigured("Error loading %s: %s" % (module, exc)) + raise ImproperlyConfigured("Error loading either pysqlite2 or sqlite3 modules (tried in that order): %s" % exc) DatabaseError = Database.DatabaseError