mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #35274 from rallytime/lint-2016.3
Lint fixes for 2016.3 branch
This commit is contained in:
commit
157939d5b0
@ -312,11 +312,11 @@ def check_password(name, password, runas=None):
|
||||
runas = salt.utils.get_user()
|
||||
|
||||
try:
|
||||
res = __salt__['cmd.run'](['rabbitmqctl', 'status'], runas=runas, python_shell=False)
|
||||
server_version = re.search(r'\{rabbit,"RabbitMQ","(.+)"\}',res)
|
||||
res = __salt__['cmd.run'](['rabbitmqctl', 'status'], runas=runas, python_shell=False)
|
||||
server_version = re.search(r'\{rabbit,"RabbitMQ","(.+)"\}', res)
|
||||
|
||||
if server_version is None:
|
||||
raise ValueError("")
|
||||
raise ValueError
|
||||
|
||||
server_version = server_version.group(1)
|
||||
version = [int(i) for i in server_version.split('.')]
|
||||
@ -333,7 +333,7 @@ def check_password(name, password, runas=None):
|
||||
output_loglevel='quiet',
|
||||
python_shell=False)
|
||||
|
||||
return not 'Error:' in res
|
||||
return 'Error:' not in res
|
||||
|
||||
cmd = ('rabbit_auth_backend_internal:check_user_login'
|
||||
'(<<"{0}">>, [{{password, <<"{1}">>}}]).').format(
|
||||
|
Loading…
Reference in New Issue
Block a user