Fixed bug of space_weather introduced with the new update_manager
This commit is contained in:
@@ -53,10 +53,10 @@ class UIspaceweather(QObject):
|
|||||||
|
|
||||||
|
|
||||||
def download_poseidon_report(self):
|
def download_poseidon_report(self):
|
||||||
network_manager = self._parent.network_manager
|
update_manager = self._parent.update_manager
|
||||||
network_manager.show_popup = True
|
poseidon_data = update_manager.fetch_remote_json(
|
||||||
poseidon_data = network_manager.fetch_remote_json(
|
Constants.POSEIDON_REPORT_URL,
|
||||||
Constants.POSEIDON_REPORT_URL
|
True
|
||||||
)
|
)
|
||||||
if poseidon_data:
|
if poseidon_data:
|
||||||
self.load_poseidon_report.emit(poseidon_data)
|
self.load_poseidon_report.emit(poseidon_data)
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class UpdateManager:
|
|||||||
Defaults to False. True is usefull when the user manual check for
|
Defaults to False. True is usefull when the user manual check for
|
||||||
updates.
|
updates.
|
||||||
"""
|
"""
|
||||||
latest_json = self._fetch_remote_json(Constants.LATEST_VERSION_URL, show_popup)
|
latest_json = self.fetch_remote_json(Constants.LATEST_VERSION_URL, show_popup)
|
||||||
if latest_json:
|
if latest_json:
|
||||||
local_db = self._load_local_db()
|
local_db = self._load_local_db()
|
||||||
remote_db = latest_json['sigID_DB']
|
remote_db = latest_json['sigID_DB']
|
||||||
@@ -83,7 +83,7 @@ class UpdateManager:
|
|||||||
self._show_popup_initial_db_download()
|
self._show_popup_initial_db_download()
|
||||||
|
|
||||||
|
|
||||||
def _fetch_remote_json(self, url, show_popup=False):
|
def fetch_remote_json(self, url, show_popup=False):
|
||||||
""" Fetches the remote json from a url
|
""" Fetches the remote json from a url
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
|||||||
Reference in New Issue
Block a user