Add ordereddict requirement

OrderedDict isn't in python 2.6 which is on some
older distros (still), so import the package that
provides it when it can not be found.

Change-Id: I9637d346e85c651e8e242025b9e88b1af3d8fca0
This commit is contained in:
Joshua Harlow 2014-04-29 17:52:56 -07:00
parent 1d6b0fd881
commit 8205010884
2 changed files with 6 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import Queue
import datetime
import dateutil.parser
import ordereddict
import requests
HIGH_PRIORITY=0
@ -32,7 +33,10 @@ LOW_PRIORITY=2
class MultiQueue(object):
def __init__(self, priorities):
try:
self.queues = collections.OrderedDict()
except AttributeError:
self.queues = ordereddict.OrderedDict()
for key in priorities:
self.queues[key] = collections.deque()
self.condition = threading.Condition()

View File

@ -3,3 +3,4 @@ sqlalchemy
GitPython>=0.3.2.RC1
python-dateutil
requests
ordereddict