mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-06 18:53:12 +00:00
fixes conditional statement for py24 compatibility
This commit is contained in:
@@ -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']
|
||||
|
||||
Reference in New Issue
Block a user