From 679b4dec26c2123c573bf167a0dfc0f51cff852a Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Sat, 7 Feb 2004 23:56:32 +0000 Subject: [PATCH] Gotta give the channel and id in deserialize. --- plugins/Herald.py | 2 +- plugins/Seen.py | 2 +- src/plugins.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/Herald.py b/plugins/Herald.py index 47a6825e0..cdf8dbfe5 100644 --- a/plugins/Herald.py +++ b/plugins/Herald.py @@ -56,7 +56,7 @@ class HeraldDB(plugins.ChannelUserDB): def serialize(self, v): return [v] - def deserialize(self, L): + def deserialize(self, channel, id, L): if len(L) != 1: raise ValueError return L[0] diff --git a/plugins/Seen.py b/plugins/Seen.py index 5b9c16940..171084635 100644 --- a/plugins/Seen.py +++ b/plugins/Seen.py @@ -61,7 +61,7 @@ class SeenDB(plugins.ChannelUserDB): def serialize(self, v): return list(v) - def deserialize(self, L): + def deserialize(self, channel, id, L): (seen, saying) = L return (float(seen), saying) diff --git a/src/plugins.py b/src/plugins.py index d2e3f7648..4487d1e0e 100644 --- a/src/plugins.py +++ b/src/plugins.py @@ -209,7 +209,7 @@ class ChannelUserDB(ChannelUserDictionary): except ValueError: # We'll skip over this so, say, nicks can be kept here. pass - v = self.deserialize(t) + v = self.deserialize(channel, id, t) self[channel, id] = v except Exception, e: log.warning('Invalid line #%s in %s.', @@ -236,7 +236,7 @@ class ChannelUserDB(ChannelUserDictionary): self.flush() self.clear() - def deserialize(self, L): + def deserialize(self, channel, id, L): """Should take a list of strings and return an object to be accessed via self.get(channel, id).""" raise NotImplementedError