def init(): # 자동으로 SSH 포트를 등록한다. 이게 옳은 건지 판단해보아야. # restore core.restore() # SSH channel = socket.gethostname().lower().replace('.', '-') add_server_if_not_registered(channel + '-ssh', 22) core.save()
def init(): # 자동으로 SSH 포트를 등록한다. 이게 옳은 건지 판단해보아야. # restore core.restore() # SSH # (위 29라인 의견) SW 설치자, 사용자에게 y / n 를 물어보면 좋겠음. 디폴트는 n channel = socket.gethostname().lower().replace('.', '-') add_server_if_not_registered(channel + '-ssh', 22) core.save()
def OnClickRestoreButton(self, event): backup_file_name = os.path.basename( os.path.normpath(self.sourceText.GetValue())) user_confirm_dialog = wx.MessageDialog( None, "{}: {}\n{}".format(strings["selected_backup_file"], backup_file_name, strings["restore_warning"]), "Confirm", wx.YES_NO | wx.ICON_EXCLAMATION) user_confirm = user_confirm_dialog.ShowModal() if user_confirm == wx.ID_YES: is_restore_success, return_string = core.restore( self.sourceText.GetValue(), self.destText.GetValue()) if is_restore_success: wx.MessageBox(strings["restore_success"], "FFXIV Backup Manager", wx.OK) exit(0) else: wx.MessageBox( "{}\n{}".format(strings["restore_failed"], return_string), "FFXIV Backup Manager", wx.OK) pub.sendMessage("change_statusbar", message=strings["restore_failed"]) else: pub.sendMessage("change_statusbar", message=strings["restore_cancelled"])