Sfoglia il codice sorgente

Attempt to fix Python 3 build

Ask Solem 8 anni fa
parent
commit
e501fc1f1c
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      celery/datastructures.py

+ 3 - 1
celery/datastructures.py

@@ -944,7 +944,9 @@ class BufferMapping(OrderedDict, Evictable):
     def __init__(self, maxsize, iterable=None, bufmaxsize=1000):
         self.maxsize = maxsize
         self.bufmaxsize = 1000
-        super(BufferMapping, self).__init__(iterable or ())
+        super(BufferMapping, self).__init__()
+        if iterable:
+            self.update(iterable)
         self.total = sum(len(buf) for buf in values(self))
 
     def pop(self, key, *default):