浏览代码

str->int key conversion no longer necessary

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

+ 0
- 1
.gitignore 查看文件

@@ -2,7 +2,6 @@
*.pyc

# Ignore bot-specific config file:
config.json
config.yml

# Ignore logs directory:


+ 0
- 8
earwigbot/wiki/functions.py 查看文件

@@ -116,14 +116,6 @@ def _get_site_object_from_dict(name, d):
user_agent = user_agent.replace("$1", earwigbot.__version__)
user_agent = user_agent.replace("$2", platform.python_version())

for key, value in namespaces.items(): # Convert string keys to integers
del namespaces[key]
try:
namespaces[int(key)] = value
except ValueError: # Data is broken, ignore it
namespaces = None
break

return Site(name=name, project=project, lang=lang, base_url=base_url,
article_path=article_path, script_path=script_path, sql=sql,
namespaces=namespaces, login=login, cookiejar=cookiejar,


正在加载...
取消
保存