Merge branch 'backend_manual' of gitlab2.kylin.com:kylin-desktop/update-manager-group/kylin-system-updater into backend_manual

This commit is contained in:
Xueyi Luo 2022-06-01 09:54:16 +08:00
commit 423e2725d6
3 changed files with 8 additions and 13 deletions

View File

@ -128,7 +128,7 @@ class UpdateMsgCollector():
json_UploadMessage = self.convertor.dictConvertJson(UploadMessage)
logging.info('Generate UploadMessage: %s.',json_UploadMessage)
logging.debug('Generate UploadMessage: %s.',json_UploadMessage)
self.UploadMessage = UploadMessage.copy()
UploadMessage.clear()
@ -143,7 +143,7 @@ class UpdateMsgCollector():
json_PackageInfo = self.convertor.dictConvertJson(PackageInfo)
logging.info('Generate PackageInfo: %s.',json_PackageInfo)
logging.debug('Generate PackageInfo: %s.',json_PackageInfo)
self.PackageInfo = PackageInfo.copy()
PackageInfo.clear()
@ -310,28 +310,28 @@ class MessageSend():
if retval != 0:
if retval == self.ERR_PARA_FROMAT:
result = "Parameter format error"
logging.info("Sent Status: false - packageName: %s : result: %s.", PackageInfo['packageName'], result)
logging.debug("Sent Status: false - packageName: %s : result: %s.", PackageInfo['packageName'], result)
elif retval == self.ERR_NO_LOACLTID:
result = "The tid value in packageInfo is abnormal, but the message is saved successfully"
logging.info("Sent Status: false - packageName: %s : result: %s.", PackageInfo['packageName'], result)
logging.debug("Sent Status: false - packageName: %s : result: %s.", PackageInfo['packageName'], result)
# 将返回的tid保存到本地
key = PackageInfo['packageName']+'_'+PackageInfo['messageType']
self.SaveTid(key, retid)
elif retval == self.ERR_ABNORMAL_SHA:
result = "Abnormal UploadedMessage Sha256"
logging.info("Sent Status: false - packageName: %s : result: %s.", PackageInfo['packageName'], result)
logging.debug("Sent Status: false - packageName: %s : result: %s.", PackageInfo['packageName'], result)
elif retval == self.ERR_UPLOADMSG_SHA:
result = "Description The UploadedMessageSha256 was decrypted incorrectly"
logging.info("Sent Status: false - packageName: %s : result: %s.", PackageInfo['packageName'], result)
logging.debug("Sent Status: false - packageName: %s : result: %s.", PackageInfo['packageName'], result)
elif retval == self.ERR_UPLOADMSG_CTS:
result = "The createTimeStamp field of UploadedMessage is abnormal"
logging.info("Sent Status: false - packageName: %s : result: %s.", PackageInfo['packageName'], result)
logging.debug("Sent Status: false - packageName: %s : result: %s.", PackageInfo['packageName'], result)
# 上传失败写入本地json
if retval != self.ERR_NO_LOACLTID or retval == self.ERR_NO_LOACLTID:
self.WriteToJson(PackageInfo['messageType'], json_PackageInfo, json_UploadMessage, encodeMsg)
elif retval == 0:
result = "Send to server success"
logging.info("Sent Status: True - packageName: %s : result: %s.", PackageInfo['packageName'], result)
logging.debug("Sent Status: True - packageName: %s : result: %s.", PackageInfo['packageName'], result)
def GetLocalTid(self, key):
# 试图获取本地tid

View File

@ -46,9 +46,7 @@ class UpdateManager():
self.update_list = None
#表示后端的状态 注意:这个状态很重要 用不好整个后端代码就会卡住
self.now_working = InstallBackend.ACTION_DEFUALT_STATUS
self.config_path = self.check_config_patch()
#建立dbus
self.dbusController = self._setup_dbus()

View File

@ -2556,9 +2556,6 @@ msgstr "%.0f kB"
msgid "Unable to access the source management server"
msgstr "无法访问源管理服务器,请稍后再试"
msgid "Connection exception with push server"
msgstr "推送服务器连接异常"
msgid "Check if your network requires authentication?"
msgstr "检查您的网络需要认证吗?"