def _change_pw(self): d = ChangePasswordDialog(self._pw, self) pw = d.get_new_pw() if not d.canceled: try: pw = patts.escape_string(pw) patts.query("SET PASSWORD=PASSWORD('{}')".format(pw)) except Exception as e: ExceptionDialog(format_exc()).exec_() self._pw = pw patts.cleanup() self._log_in()
def closeEvent(self, event): self._save_dims() patts.cleanup() super().closeEvent(event)
def _panic(): patts.cleanup() exit(0)