Changeset 1095:6729940c3d74 for src/mlx


Ignore:
Timestamp:
07/16/23 10:57:25 (17 months ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

On SimBrief login failure, it is restarted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/cef.py

    r1091 r1095  
    161161        """Called when loading of an URL fails."""
    162162        print("gui.cef.SimBriefHandler._onLoadError", browser, frame, error_code, error_text_out, failed_url)
    163         self._updateProgress(self._lastProgress,
    164                              SIMBRIEF_RESULT_ERROR_OTHER, None)
     163        if error_code==-3 and \
     164           failed_url.startswith("https://identity.api.navigraph.com/connect/authorize"):
     165            self._browser.LoadUrl(SimBriefHandler.getFormURL(self._plan))
     166            self._updateProgress(SIMBRIEF_PROGRESS_LOADING_FORM,
     167                                 SIMBRIEF_RESULT_NONE, None)
     168        else:
     169            self._updateProgress(self._lastProgress,
     170                                 SIMBRIEF_RESULT_ERROR_OTHER, None)
    165171
    166172    def _updateProgress(self, progress, results, flightInfo):
Note: See TracChangeset for help on using the changeset viewer.