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
changes/06/91206/2
Joshua Harlow 9 years ago
parent 1d6b0fd881
commit 8205010884

@ -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):
self.queues = collections.OrderedDict()
try:
self.queues = collections.OrderedDict()
except AttributeError:
self.queues = ordereddict.OrderedDict()
for key in priorities:
self.queues[key] = collections.deque()
self.condition = threading.Condition()

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

Loading…
Cancel
Save