From: Kyr Shatskyy Date: Tue, 15 Jan 2019 14:01:24 +0000 (+0100) Subject: Fix matrix dump tostr() method X-Git-Tag: 1.1.0~276^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5652aa9295201266f4b6b7da8b1480e42c8e1f68;p=teuthology.git Fix matrix dump tostr() method Addresses issue while trying to dump matrix object: AttributeError: Base instance has no attribute '__getitem__' Signed-off-by: Kyr Shatskyy --- diff --git a/teuthology/suite/matrix.py b/teuthology/suite/matrix.py index 5141f9950..fefaffbfb 100644 --- a/teuthology/suite/matrix.py +++ b/teuthology/suite/matrix.py @@ -196,7 +196,7 @@ class Concat(Matrix): def tostr(self, depth): ret = '\t'*depth + "Concat({item}):\n".format(item=self.item) - return ret + ''.join([i[1].tostr(depth+1) for i in self.submats]) + return ret + ''.join([i.tostr(depth+1) for i in self.submats]) class PickRandom(Matrix): """ @@ -220,7 +220,7 @@ class PickRandom(Matrix): def tostr(self, depth): ret = '\t'*depth + "PickRandom({item}):\n".format(item=self.item) - return ret + ''.join([i[1].tostr(depth+1) for i in self.submats]) + return ret + ''.join([i.tostr(depth+1) for i in self.submats]) class Sum(Matrix): """