Switch from pickle to str(). This may be wallpapering over the

problem, but apparently data that looks the same was pickling
differently, so was causing a checksum failure.
 - Legacy-Id: 134
This commit is contained in:
Bill Fenner 2007-05-16 03:47:53 +00:00
parent 587d2baafe
commit 22518e16c0

View file

@ -137,7 +137,8 @@ class Wizard( object ):
data = [(bf.name, bf.data) for bf in form] + [settings.SECRET_KEY] data = [(bf.name, bf.data) for bf in form] + [settings.SECRET_KEY]
# Use HIGHEST_PROTOCOL because it's the most efficient. It requires # Use HIGHEST_PROTOCOL because it's the most efficient. It requires
# Python 2.3, but Django requires 2.3 anyway, so that's OK. # Python 2.3, but Django requires 2.3 anyway, so that's OK.
pickled = pickle.dumps(data, protocol=pickle.HIGHEST_PROTOCOL) #pickled = pickle.dumps(data, protocol=pickle.HIGHEST_PROTOCOL)
pickled = str(data) #XXX
return md5.new(pickled).hexdigest() return md5.new(pickled).hexdigest()
def parse_params( self, request, *args, **kwargs ): def parse_params( self, request, *args, **kwargs ):