From 2cd3a8e5614a31b3363ef48c66c9b64dc95e3fef Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 14 Aug 2013 18:58:48 +0200 Subject: [PATCH] fix error when there is a ' char in the config path. Fixes #7344 --- src/common/logger.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/logger.py b/src/common/logger.py index 0f1321090..c49fd7043 100644 --- a/src/common/logger.py +++ b/src/common/logger.py @@ -149,7 +149,8 @@ class Logger: def attach_cache_database(self): try: - self.cur.execute("ATTACH DATABASE '%s' AS cache" % CACHE_DB_PATH) + self.cur.execute("ATTACH DATABASE '%s' AS cache" % \ + CACHE_DB_PATH.replace("'", "''")) except sqlite.Error, e: log.debug("Failed to attach cache database: %s" % str(e))