Event fired when import from clipboard button is clicked
(self, event)
| 200 | pass |
| 201 | |
| 202 | def importPatterns(self, event): |
| 203 | """Event fired when import from clipboard button is clicked""" |
| 204 | |
| 205 | text = fromClipboard() |
| 206 | if text: |
| 207 | sIS = ImplantSets.getInstance() |
| 208 | try: |
| 209 | sIS.importSets(text) |
| 210 | self.stNotice.SetLabel(_t("Patterns successfully imported from clipboard")) |
| 211 | except ImportError as e: |
| 212 | pyfalog.error(e) |
| 213 | self.stNotice.SetLabel(str(e)) |
| 214 | except (KeyboardInterrupt, SystemExit): |
| 215 | raise |
| 216 | except Exception as e: |
| 217 | pyfalog.error(e) |
| 218 | self.stNotice.SetLabel(_t("Could not import from clipboard: unknown errors")) |
| 219 | finally: |
| 220 | self.entityEditor.refreshEntityList() |
| 221 | else: |
| 222 | self.stNotice.SetLabel(_t("Could not import from clipboard")) |
| 223 | |
| 224 | def exportPatterns(self, event): |
| 225 | """Event fired when export to clipboard button is clicked""" |
nothing calls this directly
no test coverage detected