(self, event)
| 111 | return self.charChoice.GetClientData(selection) if selection not in (None, -1) else None |
| 112 | |
| 113 | def fetchFittings(self, event): |
| 114 | sEsi = Esi.getInstance() |
| 115 | waitDialog = wx.BusyInfo(_t("Fetching fits, please wait..."), parent=self) |
| 116 | activeChar = self.getActiveCharacter() |
| 117 | if activeChar is None: |
| 118 | msg = _t("Need at least one ESI character to fetch") |
| 119 | pyfalog.warning(msg) |
| 120 | self.statusbar.SetStatusText(msg) |
| 121 | return |
| 122 | try: |
| 123 | self.fittings = sEsi.getFittings(activeChar) |
| 124 | # self.cacheTime = fittings.get('cached_until') |
| 125 | # self.updateCacheStatus(None) |
| 126 | # self.cacheTimer.Start(1000) |
| 127 | self.fitTree.populateSkillTree(self.fittings) |
| 128 | del waitDialog |
| 129 | except requests.exceptions.ConnectionError: |
| 130 | msg = _t("Connection error, please check your internet connection") |
| 131 | pyfalog.error(msg) |
| 132 | self.statusbar.SetStatusText(msg) |
| 133 | except APIException as ex: |
| 134 | # Can't do this in a finally because then it obscures the message dialog |
| 135 | del waitDialog # noqa: F821 |
| 136 | ESIExceptionHandler(ex) |
| 137 | except (KeyboardInterrupt, SystemExit): |
| 138 | raise |
| 139 | except Exception as ex: |
| 140 | del waitDialog # noqa: F821 |
| 141 | raise ex |
| 142 | |
| 143 | def importFitting(self, event): |
| 144 | selection = self.fitView.fitSelection |
nothing calls this directly
no test coverage detected