Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r12011 - main/branches/2.1.6/pym/portage/cache
Date: Thu, 20 Nov 2008 22:43:09
Message-Id: E1L3IEu-0006GR-28@stork.gentoo.org
1 Author: zmedico
2 Date: 2008-11-20 22:43:07 +0000 (Thu, 20 Nov 2008)
3 New Revision: 12011
4
5 Modified:
6 main/branches/2.1.6/pym/portage/cache/sqlite.py
7 Log:
8 Remove inappropriate backslash escaping inside _db_escape_string(). (trunk
9 r12010)
10
11
12 Modified: main/branches/2.1.6/pym/portage/cache/sqlite.py
13 ===================================================================
14 --- main/branches/2.1.6/pym/portage/cache/sqlite.py 2008-11-20 22:42:01 UTC (rev 12010)
15 +++ main/branches/2.1.6/pym/portage/cache/sqlite.py 2008-11-20 22:43:07 UTC (rev 12011)
16 @@ -46,7 +46,8 @@
17
18 def _db_escape_string(self, s):
19 """meta escaping, returns quoted string for use in sql statements"""
20 - return "'%s'" % str(s).replace("\\","\\\\").replace("'","''")
21 + # This is equivalent to the _quote function from pysqlite 1.1.
22 + return "'%s'" % str(s).replace("'","''")
23
24 def _db_init_connection(self, config):
25 self._dbpath = self.location + ".sqlite"