]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
Fix matrix dump tostr() method 1251/head
authorKyr Shatskyy <kyrylo.shatskyy@suse.com>
Tue, 15 Jan 2019 14:01:24 +0000 (15:01 +0100)
committerKyr Shatskyy <kyrylo.shatskyy@suse.com>
Mon, 21 Jan 2019 18:31:17 +0000 (19:31 +0100)
Addresses issue while trying to dump matrix object:

  AttributeError: Base instance has no attribute '__getitem__'

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.de>
teuthology/suite/matrix.py

index 5141f995025849c880a5929711760c11b78c9fbc..fefaffbfb73f3051a7a44fc48443de9233e44427 100644 (file)
@@ -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):
     """