From 79db37d777c2c3d6ae81bcb647bf395350f217fe Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 22 Sep 2006 19:50:27 +0000 Subject: [PATCH] Allow cache.sqlite to use sqlite3 from python-2.5, if available. svn path=/main/trunk/; revision=4498 --- pym/cache/sqlite.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pym/cache/sqlite.py b/pym/cache/sqlite.py index 78d4cd649..40b0b9a9e 100644 --- a/pym/cache/sqlite.py +++ b/pym/cache/sqlite.py @@ -9,7 +9,10 @@ from cache.mappings import LazyLoad, ProtectedDict from cache.template import reconstruct_eclasses from portage_util import writemsg, apply_secpass_permissions from portage_data import portage_gid -from pysqlite2 import dbapi2 as db_module +try: + import sqlite3 as db_module # sqlite3 is optional with >=python-2.5 +except ImportError: + from pysqlite2 import dbapi2 as db_module DBError = db_module.Error class database(fs_template.FsBased): -- 2.26.2