App: Rename rare_core
attr to rcore
Makes it equal to the rest of the application Signed-off-by: loathingKernel <142770+loathingKernel@users.noreply.github.com>
This commit is contained in:
parent
ecee2e24e5
commit
1842ec138e
1 changed files with 8 additions and 13 deletions
21
rare/app.py
21
rare/app.py
|
@ -14,12 +14,7 @@ from requests import HTTPError
|
||||||
|
|
||||||
from rare.components.dialogs.launch_dialog import LaunchDialog
|
from rare.components.dialogs.launch_dialog import LaunchDialog
|
||||||
from rare.components.main_window import MainWindow
|
from rare.components.main_window import MainWindow
|
||||||
from rare.shared import (
|
from rare.shared import RareCore
|
||||||
LegendaryCoreSingleton,
|
|
||||||
GlobalSignalsSingleton,
|
|
||||||
ArgumentsSingleton,
|
|
||||||
)
|
|
||||||
from rare.shared.rare_core import RareCore
|
|
||||||
from rare.utils import config_helper, paths
|
from rare.utils import config_helper, paths
|
||||||
from rare.widgets.rare_app import RareApp
|
from rare.widgets.rare_app import RareApp
|
||||||
|
|
||||||
|
@ -31,7 +26,7 @@ def excepthook(exc_type, exc_value, exc_tb):
|
||||||
print("Error")
|
print("Error")
|
||||||
if exc_tb == HTTPError:
|
if exc_tb == HTTPError:
|
||||||
try:
|
try:
|
||||||
if LegendaryCoreSingleton().login():
|
if RareCore.instance().core().login():
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
raise ValueError
|
raise ValueError
|
||||||
|
@ -49,10 +44,10 @@ class App(RareApp):
|
||||||
def __init__(self, args: Namespace):
|
def __init__(self, args: Namespace):
|
||||||
log_file = "Rare_{0}.log"
|
log_file = "Rare_{0}.log"
|
||||||
super(App, self).__init__(args, log_file)
|
super(App, self).__init__(args, log_file)
|
||||||
self.rare_core = RareCore(args=args)
|
self.rcore = RareCore(args=args)
|
||||||
self.args = ArgumentsSingleton()
|
self.args = RareCore.instance().args()
|
||||||
self.signals = GlobalSignalsSingleton()
|
self.signals = RareCore.instance().signals()
|
||||||
self.core = LegendaryCoreSingleton()
|
self.core = RareCore.instance().core()
|
||||||
|
|
||||||
config_helper.init_config_handler(self.core)
|
config_helper.init_config_handler(self.core)
|
||||||
|
|
||||||
|
@ -114,8 +109,8 @@ class App(RareApp):
|
||||||
self.timer.stop()
|
self.timer.stop()
|
||||||
self.timer.deleteLater()
|
self.timer.deleteLater()
|
||||||
self.timer = None
|
self.timer = None
|
||||||
self.rare_core.deleteLater()
|
self.rcore.deleteLater()
|
||||||
del self.rare_core
|
del self.rcore
|
||||||
self.processEvents()
|
self.processEvents()
|
||||||
shutil.rmtree(paths.tmp_dir())
|
shutil.rmtree(paths.tmp_dir())
|
||||||
os.makedirs(paths.tmp_dir())
|
os.makedirs(paths.tmp_dir())
|
||||||
|
|
Loading…
Reference in a new issue