diff --git a/petl/util/random.py b/petl/util/random.py index 94fa7588..804b36ec 100644 --- a/petl/util/random.py +++ b/petl/util/random.py @@ -1,6 +1,5 @@ from __future__ import absolute_import, print_function, division - import datetime import random import time @@ -8,7 +7,6 @@ from functools import partial from petl.compat import xrange, text_type - from petl.util.base import Table @@ -52,7 +50,7 @@ def __init__(self, numflds=5, numrows=100, wait=0, seed=None): self.numrows = numrows self.wait = wait if seed is None: - self.seed = datetime.datetime.now() + self.seed = datetime.datetime.now().isoformat() else: self.seed = seed @@ -77,7 +75,7 @@ def __iter__(self): yield tuple(random.random() for n in range(nf)) def reseed(self): - self.seed = datetime.datetime.now() + self.seed = datetime.datetime.now().isoformat() def dummytable(numrows=100, @@ -154,7 +152,7 @@ def __init__(self, numrows=100, fields=None, wait=0, seed=None): else: self.fields = OrderedDict(fields) if seed is None: - self.seed = datetime.datetime.now() + self.seed = datetime.datetime.now().isoformat() else: self.seed = seed @@ -181,4 +179,4 @@ def __iter__(self): yield tuple(fields[f]() for f in fields) def reseed(self): - self.seed = datetime.datetime.now() + self.seed = datetime.datetime.now().isoformat()