From b320effdf23001a0d6d5adec59e2a6e32234d35f Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sat, 31 Mar 2012 20:35:34 -0400 Subject: [PATCH] Fix in _get_site_name_from_sitesdb() --- earwigbot/wiki/sitesdb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/earwigbot/wiki/sitesdb.py b/earwigbot/wiki/sitesdb.py index 0bd5c76..bc80f5d 100644 --- a/earwigbot/wiki/sitesdb.py +++ b/earwigbot/wiki/sitesdb.py @@ -190,10 +190,10 @@ class SitesDBManager(object): If the site is not found, return None. An empty sitesdb will be created if none exists. """ - query = "SELECT site_name FROM site WHERE site_project = ? and site_lang = ?" + query = "SELECT site_name FROM sites WHERE site_project = ? and site_lang = ?" with sqlite.connect(self._sitesdb) as conn: try: - return conn.execute(query, (project, lang)).fetchone() + return conn.execute(query, (project, lang)).fetchone()[0] except sqlite.OperationalError: self._create_sitesdb()