def force_update(self): if os.path.isfile(self.ca_path): helper = Helper() w = helper.write_bat_file(self.update_link, self.md5) if w: os.system(resource_path("update.bat")) time.sleep(0.5) self.close() sys.exit(0)
def normal_update(self): if os.path.isfile(self.ca_path): if self.new_version > 0: pid = os.getpid() print(pid) helper = Helper() helper.write_bat_file(self.update_link, self.md5) os.system(resource_path("update.bat")) self.close() sys.exit(0)
def force_update(self): if os.path.isfile(self.ca_path): helper = Helper() w = helper.write_bat_file(self.update_link, self.md5) if w: os.system('update.bat') time.sleep(0.5) self.close() sys.exit(0) else: QtWidgets.QMessageBox.warning(self, 'Warning', "Can't Find File Cacert.Pem", QtWidgets.QMessageBox.Ok)
def normal_update(self): if os.path.isfile(self.ca_path): if self.new_version > 0: pid = os.getpid() print(pid) helper = Helper() helper.write_bat_file(self.update_link, self.md5) if os.path.isfile('update.exe'): os.system("update.bat") # time.sleep(1) self.close() sys.exit(0) else: QtWidgets.QMessageBox.warning(self, 'Warning', "Can't Find File Cacert.Pem", QtWidgets.QMessageBox.Ok)
def __init__(self, mainWindow): super(tabSetting, self).__init__(mainWindow) self.mainWindow = mainWindow global serverURL self.storagonSDK = StoragonSDK(serverURL) self.Ui_tabSettingForm = Ui_tabSettingForm() self.Ui_tabSettingForm.setupUi(self) self.islogin = False self.btn_login = self.Ui_tabSettingForm.btn_login self.btn_login.clicked.connect(self.login) self.btn_logout = self.Ui_tabSettingForm.btn_logout self.btn_logout.clicked.connect(self.logout) self.txt = self.Ui_tabSettingForm.textBrowser self.Ui_tabSettingForm.inputPassword.returnPressed.connect(self.login) self.trigger.connect(self.updateLoginStatus) helper = Helper() tos = helper.getHtmlFromBunch() self.txt.setHtml(tos) self.show()