fixes conditional statement for py24 compatibility

This commit is contained in:
Peter Sprygada 2015-11-09 09:36:17 -05:00
parent 64e139adb1
commit d3d36eb766

View file

@ -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']