Browse Source

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/91/391991/1
Joshua Harlow 8 years ago
parent
commit
8205010884
  1. 6
      gertty/sync.py
  2. 1
      requirements.txt

6
gertty/sync.py

@ -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()

1
requirements.txt

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

Loading…
Cancel
Save