浏览代码

Fix in _get_site_name_from_sitesdb()

tags/v0.1^2
Ben Kurtovic 12 年前
父节点
当前提交
b320effdf2
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      earwigbot/wiki/sitesdb.py

+ 2
- 2
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()



正在加载...
取消
保存