Przeglądaj źródła

Attempt to fix Python 3 build

Ask Solem 8 lat temu
rodzic
commit
e501fc1f1c
1 zmienionych plików z 3 dodań i 1 usunięć
  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):