Update docker.py

This commit is contained in:
qiaofeng1227 2023-04-16 19:41:02 +08:00 committed by GitHub
parent 39a7058ecf
commit 5ad60b40f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ def check_appid_include_rq(app_id):
if app_id == None:
code = const.ERROR_CLIENT_PARAM_BLANK
message = "AppID is null"
elif re.match('^[a-z0-9]+_[a-z0-9]+$', app_id):
elif re.match('^[a-z0-9]+_[a-z0-9]+$', app_id) == None:
code = const.ERROR_CLIENT_PARAM_Format
message = "APP name can only be composed of numbers and lowercase letters"
elif not docker.check_appid_exist(app_id):
@ -89,7 +89,7 @@ def check_app_id(app_id):
if app_id == None:
code = const.ERROR_CLIENT_PARAM_BLANK
message = "AppID is null"
elif re.match('^[a-z0-9]+_[a-z0-9]+$', app_id):
elif re.match('^[a-z0-9]+_[a-z0-9]+$', app_id) == None::
code = const.ERROR_CLIENT_PARAM_Format
message = "APP name can only be composed of numbers and lowercase letters"
myLogger.info_logger(code)