From c3373d86775d8a3d4a9ab70c4532022476b03c0d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Tue, 7 Aug 2018 16:23:18 +0000 Subject: [PATCH] suite,report: initialize seed with None so we can set it if it is not initialized Signed-off-by: Kefu Chai --- teuthology/report.py | 2 +- teuthology/suite/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/teuthology/report.py b/teuthology/report.py index d62f478531..8f37a97e7f 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 363c2f123e..52882962ad 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) -- 2.39.5