Commit 54fa912f authored by Jérome Perrin's avatar Jérome Perrin

RNG: hack to accept old format of distribution. I am not sure this new format is required

parent 13b3216e
......@@ -49,7 +49,13 @@ class RandomNumberGenerator(object):
unknownDistribution=False
break
if unknownDistribution:
raise ValueError("Unknown distribution %r used in %s %s" %
# XXX accept old format ??
if 'distributionType' in distribution:
from copy import copy
distribution = copy(distribution) # we do not store this in json !
distribution[distribution.pop('distributionType')] = (distribution)
else:
raise ValueError("Unknown distribution %r used in %s %s" %
(distribution, obj.__class__, obj.id))
# pop irrelevant keys
for key in distribution.keys():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment