mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
fixes conditional statement for py24 compatibility
This commit is contained in:
parent
64e139adb1
commit
d3d36eb766
1 changed files with 4 additions and 1 deletions
|
@ -77,7 +77,10 @@ def nxapi_argument_spec(spec=None):
|
|||
def nxapi_url(module):
|
||||
"""Constructs a valid NXAPI url
|
||||
"""
|
||||
proto = 'https' if module.params['use_ssl'] else 'http'
|
||||
if module.params['use_ssl']:
|
||||
proto = 'https'
|
||||
else:
|
||||
proto = 'http'
|
||||
host = module.params['host']
|
||||
url = '{}://{}'.format(proto, host)
|
||||
port = module.params['port']
|
||||
|
|
Loading…
Reference in a new issue