From 595821f6fd43961f16ce3bd8003077f19b635fb9 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Wed, 9 Apr 2003 18:16:39 +0000 Subject: [PATCH] Forgot stupid __getstate__ and __setstate__. --- src/fix.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/fix.py b/src/fix.py index 9207b0c2e..a15cc0dce 100644 --- a/src/fix.py +++ b/src/fix.py @@ -223,6 +223,13 @@ class MaxLengthQueue(queue): def __init__(self, length, *args): self.length = length queue.__init__(self, *args) + + def __getstate__(self): + return (self.length, queue.__getstate__(self)) + + def __setstate__(self, (length, q)): + self.length = length + queue.__getstate__(self, q) def enqueue(self, elt): if len(self) > self.length: