完善接口

This commit is contained in:
wangsong 2021-12-03 09:45:14 +08:00
parent 76fbf1a158
commit fa02d12f42
4 changed files with 45 additions and 8 deletions

View File

@ -738,7 +738,7 @@ def LockedPreventShutdown():
return False
if not os.path.exists(FILELOCK_PATH):
logging.error("File(%s) is not exists and will be create")
logging.error("File(%s) is not exists and will be create",FILELOCK_PATH)
os.makedirs(FILELOCK_PATH)
try:

View File

@ -151,10 +151,11 @@ class InstallBackendAptdaemon(InstallBackend):
authorized=False, success=False,
error_string='', error_desc='')
except Exception:
self._action_done(self.ACTION_INSTALL_DEB,
is_cancelled=False, success=False,
error_string='', error_desc='')
raise
pass
# self._action_done(self.ACTION_INSTALL_DEB,
# is_cancelled=False, success=False,
# error_string='', error_desc='')
# raise
@inline_callbacks
def fix_broken(self):

View File

@ -127,8 +127,8 @@
- `入参:` `source:(string)` 安装来源,`path:(string)`本地deb包绝对路径`_check_local_dep:(bool)`出现依赖问题时是否查询本路径下是否存在满足的包,`_auto_satisfy:(bool)`出现依赖问题时是否通过网络下载并安装依赖包
- `出参:`True or False
- `对应信号:`
- `InstalldebStatusChanged`:安装过程的进度信号以及状态
- `InstalldebFinished`:安装完成的信号
- `InstalldebStatusChanged`:安装过程的进度信号以及状态
- `InstalldebFinished`:安装完成的信号
- `示例:`
```sh
@ -305,7 +305,43 @@
#### InstalldebStatusChanged
- `介绍:`安装的进度信息和状态信息以及状态的细节信息
- `出参`:`i:`安装的进度信息从0-100%`s:`安装的状态信息,`s:`安装的细节信息
- `示例:`
```sh
InstalldebStatusChanged progress = 57 , status = 正在应用更改 ,current_details = 正在配置 python3-bandit
InstalldebStatusChanged progress = 57 , status = 正在应用更改 ,current_details = python3-bandit 已安装
```
#### InstalldebFinished
- `介绍:`安装的完成的信号
- `出参`: `b:`安装是否成功,`s:`产生错误的结果,`s:`产生错误的原因
- `示例:`
```sh
#安装完成
InstalldebFinished success = True , error_string = , error_desc =
#安装失败 缺少依赖的
InstalldebFinished success = False , error_string = bandit dependency is not satisfied. , error_desc = python3-bandit
#安装失败 选择从网络拉依赖 网络断开 报网络错误
InstalldebFinished success = False , error_string = 下载软件包文件失败 , error_desc = 检查您的网络连接。
```

View File

@ -2590,7 +2590,7 @@ msgid "Checking network connection"
msgstr "检查网络连接中"
msgid "Updating Source Template"
msgstr "更新源板中"
msgstr "更新源板中"
msgid "Update Manager upgrade is complete, please restart the control panel before performing the system update"
msgstr "更新管理器升级完成,请重启控制面板后再进行系统更新"