lib: Use new style Python classes.
Inherit from object in all Python classes. This is a "new style" class. It's best to always use them. In Python 3, all classes are "new style", so this ensures consistent behavior between 2 and 3. Change-Id: I958baf19a076a6cf3cc57455f05d24182ac1f005 Signed-off-by: Russell Bryant <rbryant@redhat.com>
This commit is contained in:
parent
7d90a11856
commit
41ab91259d
@ -15,7 +15,7 @@ import os
|
||||
import logging
|
||||
import shutil
|
||||
|
||||
class Connmon:
|
||||
class Connmon(object):
|
||||
|
||||
def __init__(self, config):
|
||||
self.logger = logging.getLogger('browbeat.Connmon')
|
||||
|
@ -20,7 +20,7 @@ import sys
|
||||
browbeat_uuid = uuid.uuid4()
|
||||
|
||||
|
||||
class Elastic:
|
||||
class Elastic(object):
|
||||
|
||||
"""
|
||||
"""
|
||||
|
@ -14,7 +14,7 @@ import logging
|
||||
import subprocess
|
||||
|
||||
|
||||
class Grafana:
|
||||
class Grafana(object):
|
||||
|
||||
def __init__(self, config):
|
||||
self.logger = logging.getLogger('browbeat.Grafana')
|
||||
|
@ -15,7 +15,7 @@ import sys
|
||||
import os
|
||||
|
||||
|
||||
class Metadata:
|
||||
class Metadata(object):
|
||||
|
||||
def __init__(self):
|
||||
pass
|
||||
|
@ -15,7 +15,7 @@ import os
|
||||
import subprocess
|
||||
|
||||
|
||||
class Tools:
|
||||
class Tools(object):
|
||||
|
||||
def __init__(self, config=None):
|
||||
self.logger = logging.getLogger('browbeat.Tools')
|
||||
|
@ -16,7 +16,7 @@ import os
|
||||
import yaml
|
||||
|
||||
|
||||
class WorkloadBase:
|
||||
class WorkloadBase(object):
|
||||
__metaclass__ = abc.ABCMeta
|
||||
logger = logging.getLogger('browbeat.WorkloadBase')
|
||||
success = 0
|
||||
|
Loading…
Reference in New Issue
Block a user