From 76d1af164c63232489b4e2000ae73ed5146615cd Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Sat, 24 Mar 2012 20:48:42 -0400 Subject: [PATCH] str->int key conversion no longer necessary --- .gitignore | 1 - earwigbot/wiki/functions.py | 8 -------- 2 files changed, 9 deletions(-) diff --git a/.gitignore b/.gitignore index f3cb28b..5c965b9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ *.pyc # Ignore bot-specific config file: -config.json config.yml # Ignore logs directory: diff --git a/earwigbot/wiki/functions.py b/earwigbot/wiki/functions.py index 5444af2..5504306 100644 --- a/earwigbot/wiki/functions.py +++ b/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,