proper inherit remove return from __init__
This commit is contained in:
parent
31c5e4ff38
commit
583e5910fe
|
@ -23,9 +23,13 @@ from debug import logger
|
||||||
class UpgradeDB():
|
class UpgradeDB():
|
||||||
"""Upgrade Db with respect to versions"""
|
"""Upgrade Db with respect to versions"""
|
||||||
|
|
||||||
def __init__(self, cur, version):
|
def __init__(self):
|
||||||
""" Apply switcher to call methods accordingly """
|
""" Apply switcher to call methods accordingly """
|
||||||
|
self.cur = None
|
||||||
|
self.parameters = ""
|
||||||
|
|
||||||
|
def switcher(self, cur, version):
|
||||||
|
""" Apply switcher to call methods accordingly """
|
||||||
self.cur = cur
|
self.cur = cur
|
||||||
self.parameters = ""
|
self.parameters = ""
|
||||||
|
|
||||||
|
@ -439,7 +443,7 @@ class sqlThread(threading.Thread, UpgradeDB):
|
||||||
self.cur.execute(item, parameters)
|
self.cur.execute(item, parameters)
|
||||||
currentVersion = int(self.cur.fetchall()[0][0])
|
currentVersion = int(self.cur.fetchall()[0][0])
|
||||||
# Call upgrade class for upgrade DB
|
# Call upgrade class for upgrade DB
|
||||||
UpgradeDB(self.cur, currentVersion)
|
self.switcher(self.cur, currentVersion)
|
||||||
|
|
||||||
# Are you hoping to add a new option to the keys.dat file of existing
|
# Are you hoping to add a new option to the keys.dat file of existing
|
||||||
# Bitmessage users or modify the SQLite database? Add it right
|
# Bitmessage users or modify the SQLite database? Add it right
|
||||||
|
|
Reference in New Issue
Block a user