From 583e5910fe10669008d255fd8d1aab77b8f5f2fc Mon Sep 17 00:00:00 2001 From: Muzahid Date: Sat, 6 Feb 2021 20:03:48 +0530 Subject: [PATCH] proper inherit remove return from __init__ --- src/class_sqlThread.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/class_sqlThread.py b/src/class_sqlThread.py index 0a39a0f2..77e2dcb9 100644 --- a/src/class_sqlThread.py +++ b/src/class_sqlThread.py @@ -23,9 +23,13 @@ from debug import logger class UpgradeDB(): """Upgrade Db with respect to versions""" - def __init__(self, cur, version): + def __init__(self): """ 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.parameters = "" @@ -439,7 +443,7 @@ class sqlThread(threading.Thread, UpgradeDB): self.cur.execute(item, parameters) currentVersion = int(self.cur.fetchall()[0][0]) # 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 # Bitmessage users or modify the SQLite database? Add it right