Use python abc in StressAction class

Fix pylint error about NotImplemented raised instead of
NotImplementedError.

Use the abc class instead of NotImplementedError.

Partial-Bug: #1346797

Change-Id: Ia9a75a53f68c28594654a07146a2a30c1ae3c412
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This commit is contained in:
Danny Al-Gaaf 2014-08-13 11:25:24 +02:00
parent 4f44d72d9c
commit fd247f5922
1 changed files with 6 additions and 1 deletions

View File

@ -12,12 +12,16 @@
# License for the specific language governing permissions and limitations
# under the License.
import abc
import signal
import sys
import six
from tempest.openstack.common import log as logging
@six.add_metaclass(abc.ABCMeta)
class StressAction(object):
def __init__(self, manager, max_runs=None, stop_on_error=False):
@ -83,6 +87,7 @@ class StressAction(object):
self.tearDown()
sys.exit(1)
@abc.abstractmethod
def run(self):
"""This method is where the stress test code runs."""
raise NotImplemented()
return