生成UUID

This commit is contained in:
luoxueyi 2021-12-13 14:06:23 +08:00
parent e31f2521d3
commit f7f016ba98
2 changed files with 10 additions and 1 deletions

View File

@ -4,6 +4,7 @@
#!/usr/bin/python3
import json
import dbus
import uuid
import base64
import hashlib
import logging
@ -38,6 +39,7 @@ class UpdateMsgCollector():
for key in dict_message.keys():
if "packageName" != key:
UploadMessage[key] = dict_message[key]
UploadMessage['UUID'] = str(uuid.uuid1())
except Exception as e:
logging.error(str(e))

View File

@ -169,7 +169,14 @@
- `示例:`
```sh
messageType = "update-infos", uploadMessage = "{\"packageName\":\"kylin-system-updater\",\"author\":\"Xueyi Luo\" ...}"
messageType = "UpdateInfos", uploadMessage = "{\"packageName\":\"kylin-system-updater\",\"source\":\"kylin-system-updater\",\"status\":\"True\",\"errorCode\":\"\",\"versionOld\":\"1.2.13.2kord\",\"versionNew\":\"1.2.17.1kord\"}"
messageType: 消息埋点(string) "UpdateInfos"、"InstallInfos"、"RemoveInfos"...
source: 安装来源 "kylin-installer"、"unattented-upgrade"、"kylin-software-center"、"kylin-system-updater"...
status: 安装或卸载状态 "True"/"False"
errorCode: 错误信息 ""/"..."
versionOld: 旧版本号 "1.2.13.2kord"
versionNew: 新版本号 "1.2.17.1kord"
```