Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
openEuler-Advisor
提交
19351091
O
openEuler-Advisor
项目概览
openeuler
/
openEuler-Advisor
通知
32
Star
4
Fork
4
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openEuler-Advisor
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
19351091
编写于
6月 28, 2020
作者:
J
jiang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Clear status code information and Improve interface input and participate in input and output and
Remove exception
上级
11e894a3
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
6 deletion
+21
-6
packageship/packageship/application/apps/package/function/constants.py
...ackageship/application/apps/package/function/constants.py
+2
-3
packageship/packageship/application/apps/package/function/packages.py
...packageship/application/apps/package/function/packages.py
+18
-2
packageship/packageship/application/apps/package/view.py
packageship/packageship/application/apps/package/view.py
+1
-1
未找到文件。
packageship/packageship/application/apps/package/function/constants.py
浏览文件 @
19351091
...
...
@@ -36,10 +36,9 @@ class ResponseCode():
PACK_NAME_NOT_FOUND
=
"4003"
CONNECT_DB_ERROR
=
"4004"
INPUT_NONE
=
"4005"
# Delete database module error status code
FILE_NOT_FOUND
=
"40041"
FILE_NOT_FOUND
=
"4006"
# Database operation module error status code
DELETE_DB_ERROR
=
"40051"
# Database initialization module error status code
CONFIGFILE_PATH_EMPTY
=
"50001"
FAILED_CREATE_DATABASE_TABLE
=
"50002"
TYPE_ERROR
=
"50003"
...
...
packageship/packageship/application/apps/package/function/packages.py
浏览文件 @
19351091
...
...
@@ -15,6 +15,7 @@ from packageship.libs.exception import Error
def
get_packages
(
dbname
):
'''
Description: Get all packages info
:param dbname: Database name
:return: package info
'''
with
DBHelper
(
db_name
=
dbname
)
as
db_name
:
...
...
@@ -37,6 +38,7 @@ def get_packages(dbname):
def
buildep_packages
(
dbname
,
src_pack_id
):
"""
Description: Query package layer 1 compilation dependency
:param dbname: databases name
:param src_pack_id: srcpackage id
:return: buildDep Compile dependencies of source packages
...
...
@@ -58,6 +60,7 @@ def buildep_packages(dbname, src_pack_id):
def
sub_packages
(
dbname
,
src_pack_id
):
"""
Description: Query package layer 1 installation dependency
:param dbname: databases name
:param src_pack_id: srcpackage id
:return: subpack Source package to binary package, then find the installation dependencies
...
...
@@ -92,6 +95,8 @@ def sub_packages(dbname, src_pack_id):
def
get_single_package
(
dbname
,
sourcename
):
'''
Description: Get all packages info
:param dbname: Database name
:param sourcename: Source package name
:return: package info
'''
with
DBHelper
(
db_name
=
dbname
)
as
db_name
:
...
...
@@ -120,7 +125,11 @@ def update_single_package(
maintainer
,
maintain_level
):
"""
change single package management
Description: change single package management
:param package_name: package name
:param dbname: Database name
:param maintainer: maintainer info
:param maintain_level: maintain_level info
:return: message success or failed
"""
with
DBHelper
(
db_name
=
dbname
)
as
db_name
:
...
...
@@ -136,7 +145,14 @@ def update_maintaniner_info(package_name,
maintaniner
,
maintainlevel
):
'''
Separate maintenance information
"""
update separately maintaniner info
:param package_name: package name
:param dbname: Database name
:param maintainer: maintainer info
:param maintain_level: maintain_level info
:return: message success or failed
"""
'''
with
DBHelper
(
db_name
=
dbname
)
as
db_name
:
src_pack_obj
=
db_name
.
session
.
query
(
src_pack
).
filter_by
(
...
...
packageship/packageship/application/apps/package/view.py
浏览文件 @
19351091
...
...
@@ -450,7 +450,7 @@ class InitSystem(Resource):
except
FileNotFoundError
as
file_not_found_error
:
LOGGER
.
logger
.
error
(
file_not_found_error
)
abnormal
=
ResponseCode
.
FILE_NOT_FIND_ERROR
except
(
Error
,
Exception
)
as
error
:
except
Error
as
error
:
LOGGER
.
logger
.
error
(
error
)
abnormal
=
ResponseCode
.
FAILED_CREATE_DATABASE_TABLE
if
abnormal
is
not
None
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录