mirror of https://github.com/scrapy/scrapy.git
PickleDiskQueue: use pickle protocol 2
This commit is contained in:
parent
6a31ab667d
commit
789e1493e9
|
|
@ -10,7 +10,8 @@ from scrapy.utils.queue import DiskQueue
|
|||
class PickleDiskQueue(DiskQueue):
|
||||
|
||||
def push(self, obj):
|
||||
super(PickleDiskQueue, self).push(pickle.dumps(obj))
|
||||
s = pickle.dumps(obj, protocol=2)
|
||||
super(PickleDiskQueue, self).push(s)
|
||||
|
||||
def pop(self):
|
||||
s = super(PickleDiskQueue, self).pop()
|
||||
|
|
|
|||
Loading…
Reference in New Issue