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:
Russell Bryant 2016-08-12 16:29:04 -04:00
parent 7d90a11856
commit 41ab91259d
6 changed files with 6 additions and 6 deletions

View File

@ -15,7 +15,7 @@ import os
import logging import logging
import shutil import shutil
class Connmon: class Connmon(object):
def __init__(self, config): def __init__(self, config):
self.logger = logging.getLogger('browbeat.Connmon') self.logger = logging.getLogger('browbeat.Connmon')

View File

@ -20,7 +20,7 @@ import sys
browbeat_uuid = uuid.uuid4() browbeat_uuid = uuid.uuid4()
class Elastic: class Elastic(object):
""" """
""" """

View File

@ -14,7 +14,7 @@ import logging
import subprocess import subprocess
class Grafana: class Grafana(object):
def __init__(self, config): def __init__(self, config):
self.logger = logging.getLogger('browbeat.Grafana') self.logger = logging.getLogger('browbeat.Grafana')

View File

@ -15,7 +15,7 @@ import sys
import os import os
class Metadata: class Metadata(object):
def __init__(self): def __init__(self):
pass pass

View File

@ -15,7 +15,7 @@ import os
import subprocess import subprocess
class Tools: class Tools(object):
def __init__(self, config=None): def __init__(self, config=None):
self.logger = logging.getLogger('browbeat.Tools') self.logger = logging.getLogger('browbeat.Tools')

View File

@ -16,7 +16,7 @@ import os
import yaml import yaml
class WorkloadBase: class WorkloadBase(object):
__metaclass__ = abc.ABCMeta __metaclass__ = abc.ABCMeta
logger = logging.getLogger('browbeat.WorkloadBase') logger = logging.getLogger('browbeat.WorkloadBase')
success = 0 success = 0