mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 10:36:52 -07:00
Convert to new-style class by inheriting from object
This commit is contained in:
parent
8434fd5419
commit
76a00b2493
5 changed files with 8 additions and 8 deletions
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue