From: Kefu Chai Date: Thu, 17 Oct 2019 15:23:11 +0000 (+0800) Subject: qa/tasks/ceph: tolerate 'T' or ' ' as date and time separator X-Git-Tag: v15.1.0~1213^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=09863ef3d949af461e6da904a49fb73d1ce5f57d;p=ceph-ci.git 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 --- 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