Fix bug #42818 in win_iis module

Exception in function "create_cert_binding".
function fails with the following exception:
2017-08-09 00:23:32,096 [salt.state ][ERROR ][2948] An exception occurred in this state: Traceback (most recent call last):
File "c:\salt\bin\lib\site-packages\salt\state.py", line 1837, in call
**cdata['kwargs'])
File "c:\salt\bin\lib\site-packages\salt\loader.py", line 1794, in wrapper
return f(*args, **kwargs)
File "c:\salt\var\cache\salt\minion\extmods\states\win_iisV2.py", line 326, in create_cert_binding
ipaddress, port, sslflags)
File "c:\salt\var\cache\salt\minion\extmods\modules\win_iisV2.py", line 861, in create_cert_binding
if binding_info not in new_cert_bindings(site):
TypeError: 'dict' object is not callable


**This is the problematic code:
new_cert_bindings = list_cert_bindings(site)
if binding_info not in new_cert_bindings(site):

Just need to remove (site) from second line as follows and it's fixed:
new_cert_bindings = list_cert_bindings(site)
if binding_info not in new_cert_bindings:**
This commit is contained in:
Mapel88 2017-08-10 10:39:43 +03:00 committed by GitHub
parent 135f9522d0
commit 497241fbcb

View file

@ -856,7 +856,7 @@ def create_cert_binding(name, site, hostheader='', ipaddress='*', port=443,
new_cert_bindings = list_cert_bindings(site)
if binding_info not in new_cert_bindings(site):
if binding_info not in new_cert_bindings:
log.error('Binding not present: {0}'.format(binding_info))
return False