]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/ceph: tolerate 'T' or ' ' as date and time separator 30973/head
authorKefu Chai <kchai@redhat.com>
Thu, 17 Oct 2019 15:23:11 +0000 (23:23 +0800)
committerKefu Chai <kchai@redhat.com>
Mon, 21 Oct 2019 04:18:58 +0000 (12:18 +0800)
str.replace() does not change the string in-place, so we need to assign
its return value to `t`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
qa/tasks/ceph.py

index e6196f72252c5d19390c11479f9f61598ffdade0..1be207d2d5d494314d0b59b88b6c12246c676138 100644 (file)
@@ -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