Convert to new-style class by inheriting from object

This commit is contained in:
Labrys 2016-06-04 23:01:15 -04:00
commit 76a00b2493
5 changed files with 8 additions and 8 deletions

View file

@ -236,7 +236,7 @@ class NTMRotatingLogHandler(object):
sys.exit(1)
class DispatchingFormatter:
class DispatchingFormatter(object):
def __init__(self, formatters, default_formatter):
self._formatters = formatters
self._default_formatter = default_formatter

View file

@ -11,7 +11,7 @@ from core import logger
from itertools import chain
class Section(configobj.Section):
class Section(configobj.Section, object):
def isenabled(section):
# checks if subsection enabled, returns true/false if subsection specified otherwise returns true/false in {}
if not section.sections:

View file

@ -23,7 +23,7 @@ def dbFilename(filename="nzbtomedia.db", suffix=None):
return core.os.path.join(core.PROGRAM_DIR, filename)
class DBConnection:
class DBConnection(object):
def __init__(self, filename="nzbtomedia.db", suffix=None, row_type=None):
self.filename = filename

View file

@ -1229,7 +1229,7 @@ def get_downloadInfo(inputName, status):
return sqlResults
class RunningProcess():
class RunningProcess(object):
""" Limits application to single instance """
def __init__(self):
@ -1245,7 +1245,7 @@ class RunningProcess():
# self.process.__del__()
class WindowsProcess():
class WindowsProcess(object):
def __init__(self):
self.mutexname = "nzbtomedia_" + core.PID_FILE.replace('\\', '/') # {D0E858DF-985E-4907-B7FB-8D732C3FC3B9}"
if platform.system() == 'Windows':
@ -1271,7 +1271,7 @@ class WindowsProcess():
self.CloseHandle(self.mutex)
class PosixProcess():
class PosixProcess(object):
def __init__(self):
self.pidpath = core.PID_FILE
self.lock_socket = None

View file

@ -17,7 +17,7 @@ import core
from core import logger
class CheckVersion():
class CheckVersion(object):
"""
Version check class meant to run as a thread object with the SB scheduler.
"""
@ -82,7 +82,7 @@ class CheckVersion():
return self.updater.update()
class UpdateManager():
class UpdateManager(object):
def get_github_repo_user(self):
return core.GIT_USER