From 5486a92b27c839f37c63a2dfef653dc93a3021c4 Mon Sep 17 00:00:00 2001 From: Fabio Erculiani Date: Sat, 2 Jan 2010 08:53:08 +0100 Subject: [PATCH] [entropy.db] pysqlite is dead, only check inside Python package --- libraries/entropy/db/__init__.py | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/libraries/entropy/db/__init__.py b/libraries/entropy/db/__init__.py index 64488440c..731615b21 100644 --- a/libraries/entropy/db/__init__.py +++ b/libraries/entropy/db/__init__.py @@ -41,19 +41,16 @@ from entropy.core.settings.base import SystemSettings from entropy.spm.plugins.factory import get_default_instance as get_spm from entropy.db.plugin_store import EntropyRepositoryPluginStore -try: # try with sqlite3 from >=python 2.5 +try: from sqlite3 import dbapi2 -except ImportError: # fallback to pysqlite - try: - from pysqlite2 import dbapi2 - except ImportError as e: - raise SystemError( - "%s. %s: %s" % ( - _("Entropy needs Python compiled with sqlite3 support"), - _("Error"), - e, - ) +except ImportError as err: + raise SystemError( + "%s. %s: %s" % ( + _("Entropy needs Python compiled with sqlite3 support"), + _("Error"), + err, ) + ) class EntropyRepository(EntropyRepositoryPluginStore, TextInterface):