From a3bde6b630f674e26d11151f4ea4636c7d08aef9 Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 21 Sep 2009 18:19:39 +0000 Subject: [PATCH] Decode database name passed to portage.cache.sqlite.database._db_module.connect() for compatibility with Python 3. svn path=/main/trunk/; revision=14357 --- pym/portage/cache/sqlite.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pym/portage/cache/sqlite.py b/pym/portage/cache/sqlite.py index 48dfd3aac..1ac6f1ffe 100644 --- a/pym/portage/cache/sqlite.py +++ b/pym/portage/cache/sqlite.py @@ -6,7 +6,7 @@ import sys from portage.cache import fs_template from portage.cache import cache_errors from portage import os -from portage import _unicode_encode +from portage import _unicode_decode from portage.cache.template import reconstruct_eclasses from portage.util import writemsg from portage.localization import _ @@ -67,7 +67,7 @@ class database(fs_template.FsBased): try: self._ensure_dirs() self._db_connection = self._db_module.connect( - database=_unicode_encode(self._dbpath), **connection_kwargs) + database=_unicode_decode(self._dbpath), **connection_kwargs) self._db_cursor = self._db_connection.cursor() self._db_cursor.execute("PRAGMA encoding = %s" % self._db_escape_string("UTF-8")) if not self._ensure_access(self._dbpath): -- 2.26.2