ceph/qa/tasks/thrasher.py
Jos Collin f31791e35d
qa/tasks: introduce Thrasher base class
* Introduced a Thrasher base class.
* Updated thrashers to inherit from Thrasher.
* Replaced the magic variable e with Thrasher.exception as per the discussion.
  Now the exception variable sets by default as the thrashers are inheriting
  from the Thrasher class.

Fixes: https://github.com/ceph/ceph/pull/28378#discussion_r309337928
Fixes: https://tracker.ceph.com/issues/41133
Signed-off-by: Jos Collin <jcollin@redhat.com>
2019-08-21 10:49:46 +05:30

17 lines
298 B
Python

"""
Thrasher base class
"""
class Thrasher(object):
def __init__(self):
super(Thrasher, self).__init__()
self.exception = None
@property
def exception(self):
return self._exception
@exception.setter
def exception(self, e):
self._exception = e