From 09863ef3d949af461e6da904a49fb73d1ce5f57d Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Thu, 17 Oct 2019 23:23:11 +0800 Subject: [PATCH] qa/tasks/ceph: tolerate 'T' or ' ' as date and time separator str.replace() does not change the string in-place, so we need to assign its return value to `t`. Signed-off-by: Kefu Chai --- qa/tasks/ceph.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/qa/tasks/ceph.py b/qa/tasks/ceph.py index e6196f72252..1be207d2d5d 100644 --- a/qa/tasks/ceph.py +++ b/qa/tasks/ceph.py @@ -1300,8 +1300,7 @@ def osd_scrub_pgs(ctx, config): loop = False thiscnt = 0 for (pgid, tmval) in timez: - t = tmval[0:tmval.find('.')] - t.replace(' ', 'T') + t = tmval[0:tmval.find('.')].replace(' ', 'T') pgtm = time.strptime(t, '%Y-%m-%dT%H:%M:%S') if pgtm > check_time_now: thiscnt += 1 -- 2.39.5