提交 c42891d3 编写于 作者: C chenyanpanHW 提交者: Gitee

!23 修改issue

Merge pull request !23 from ZhangYifan/fix_issue
......@@ -62,7 +62,7 @@ def check_settings_conf():
required_settings = ['LISTEN', 'GITHUB_ACCESS_TOKEN', 'GITEE_ACCESS_TOKEN', 'SCAN_DB_INTERVAL', 'USER', 'PASSWORD']
for setting in required_settings:
if setting in app.config:
if not app.config[setting]:
if app.config[setting] == "":
logger.error('%s is empty in settings.conf.', setting)
setting_error = True
else:
......
......@@ -79,7 +79,7 @@ if __name__ == "__main__":
err = latin1_encode(password_)
if err:
usage()
print("PASSWORD: outside the 'latin-1' character set range")
print("PASSWORD: only latin1 character set are allowed")
sys.exit(1)
ret = password_strength_check(password_)
......
......@@ -143,10 +143,10 @@ def params_input_track(params, file_path=None):
err = latin1_encode(user)
if err:
return "error", "user: outside the 'latin-1' character set range"
return "error", "ERROR: user: only latin1 character set are allowed."
err = latin1_encode(password)
if err:
return "error", "password: outside the 'latin-1' character set range"
return "error", "ERROR: user: only latin1 character set are allowed."
enabled = bool(enabled == 'true')
......@@ -237,10 +237,12 @@ def delete(args):
err = latin1_encode(user)
if err:
return "error", "user: outside the 'latin-1' character set range"
print("ERROR: user: only latin1 character set are allowed.")
return
err = latin1_encode(password)
if err:
return "error", "password: outside the 'latin-1' character set range"
print("ERROR: password: Only latin1 character set are allowed.")
return
url = '/'.join(['https:/', server, 'tracking'])
if args.branch:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册