fbradyirl / openwrt-luci-rpc

Other
34 stars 22 forks source link

InsecureRequestWarning issues even when SSL not used #56

Open glyndon opened 1 year ago

glyndon commented 1 year ago

Description

Using this in HomeAssistant to track devices. Despite setting to false both ssl and verify_ssl, the urllib3 still issues (and fills logs with) the error InsecureRequestWarning

What I Did

de-indented, by one level, lines 48-51 in openwrt_luci_rpc.py

Because of the indentation level of lines 48-51, they are only run when ssl is true, however, the library issues the warning even though it was told to use no SSL. Therefore the warning needs to be disabled whenever verify_ssl is set to false, regardless of the setting of ssl.