From 5652aa9295201266f4b6b7da8b1480e42c8e1f68 Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Tue, 15 Jan 2019 15:01:24 +0100 Subject: [PATCH] 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 --- teuthology/suite/matrix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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): """ -- 2.47.3