From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 21 Sep 2009 18:19:39 +0000 (-0000) Subject: Decode database name passed to portage.cache.sqlite.database._db_module.connect(... X-Git-Tag: v2.2_rc42~65 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a3bde6b630f674e26d11151f4ea4636c7d08aef9;p=portage.git Decode database name passed to portage.cache.sqlite.database._db_module.connect() for compatibility with Python 3. svn path=/main/trunk/; revision=14357 --- 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):