From dd9eae496d76a7691f1c16fc5fa251fa9a0ed4de Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 30 Aug 2009 10:36:51 +0000 Subject: Bug #283223 - Don't call str() inside _db_escape_string(), since it's redundant and it can trigger a UnicodeEncodeError in python-2.x. svn path=/main/trunk/; revision=14171 --- pym/portage/cache/sqlite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pym/portage/cache/sqlite.py b/pym/portage/cache/sqlite.py index 0a8424880..81c076257 100644 --- a/pym/portage/cache/sqlite.py +++ b/pym/portage/cache/sqlite.py @@ -48,7 +48,7 @@ class database(fs_template.FsBased): def _db_escape_string(self, s): """meta escaping, returns quoted string for use in sql statements""" # This is equivalent to the _quote function from pysqlite 1.1. - return "'%s'" % str(s).replace("'","''") + return "'%s'" % s.replace("'", "''") def _db_init_connection(self, config): self._dbpath = self.location + ".sqlite" -- cgit v1.2.3-1-g7c22