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,6 +49,12 @@ class RandomNumberGenerator(object):
unknownDistribution=False
break
if unknownDistribution:
# 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
......
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