From: Kefu Chai Date: Tue, 7 Aug 2018 16:23:18 +0000 (+0000) Subject: suite,report: initialize seed with None X-Git-Tag: 1.1.0~322^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=c3373d86775d8a3d4a9ab70c4532022476b03c0d;p=teuthology.git suite,report: initialize seed with None so we can set it if it is not initialized Signed-off-by: Kefu Chai --- diff --git a/teuthology/report.py b/teuthology/report.py index d62f47853..8f37a97e7 100644 --- a/teuthology/report.py +++ b/teuthology/report.py @@ -394,7 +394,7 @@ class ResultsReporter(object): log_path = os.path.join(self.archive_base, run_name, 'results.log') # parse the log file generated by teuthology.results.results() subset = None - seed = -1 + seed = None with file(log_path) as results_log: for line in results_log: if ':' not in line: diff --git a/teuthology/suite/__init__.py b/teuthology/suite/__init__.py index 363c2f123..52882962a 100644 --- a/teuthology/suite/__init__.py +++ b/teuthology/suite/__init__.py @@ -112,7 +112,7 @@ def get_rerun_filters(name, statuses): def get_rerun_conf(conf): reporter = ResultsReporter() subset, seed = reporter.get_rerun_conf(conf.rerun) - if seed < 0: + if seed is None: return conf.subset, conf.seed if conf.seed < 0: log.info('Using stored seed=%s', seed)