From bcfb3880841ffcae1c4a46f1c372e560da9f12c7 Mon Sep 17 00:00:00 2001 From: Pmoranga Date: Fri, 7 Mar 2014 17:56:22 +0100 Subject: [PATCH] Fix OrderedDict to work on Python 2.6 --- modules/tasks.py | 5 ++++- sevabot/bot/bot.py | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/modules/tasks.py b/modules/tasks.py index 6cebcf1..2fbd251 100644 --- a/modules/tasks.py +++ b/modules/tasks.py @@ -14,7 +14,10 @@ import os import logging import pickle -from collections import OrderedDict +try: + from collections import OrderedDict +except ImportError: + from ordereddict import OrderedDict from sevabot.bot.stateful import StatefulSkypeHandler from sevabot.utils import ensure_unicode, get_chat_id diff --git a/sevabot/bot/bot.py b/sevabot/bot/bot.py index d0e4f74..98eed26 100644 --- a/sevabot/bot/bot.py +++ b/sevabot/bot/bot.py @@ -5,7 +5,10 @@ import logging import hashlib import time -from collections import OrderedDict +try: + from collections import OrderedDict +except ImportError: + from ordereddict import OrderedDict from inspect import getmembers, isclass import Skype4Py