]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
test/rgw: SystemObject.json_command no longer trims json output
authorCasey Bodley <cbodley@redhat.com>
Mon, 4 May 2020 20:38:34 +0000 (16:38 -0400)
committerCasey Bodley <cbodley@redhat.com>
Mon, 4 May 2020 20:38:36 +0000 (16:38 -0400)
this was a workaround for 'period commit' commands that used to write
the "Sending period to new master zone" line to stdout

Signed-off-by: Casey Bodley <cbodley@redhat.com>
src/test/rgw/rgw_multi/multisite.py

index a79c42909b16f7fabfed0e3242fecc9c8f0feb7a..d591f340e64cf79c707f42e62ca63555b8e692bb 100644 (file)
@@ -72,8 +72,7 @@ class SystemObject:
         data and retcode """
         s, r = self.command(cluster, cmd, args or [], **kwargs)
         if r == 0:
-            output = s[s.find('{'):] # trim extra output before json
-            data = json.loads(output)
+            data = json.loads(s)
             self.load_from_json(data)
             self.data = data
         return self.data, r