IgwnOmniAuth raises TypeError on Debian
Any use of the IgwnOmniAuth
request handler on Debian, or any platform where requests-kerberos
is used in place of requests-gssapi
, raises a TypeError
:
$ python3 -m igwn_monitor.plugins.check_url -a any -H example.com
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/duncan/git/igwn-monitoring-plugins/igwn_monitor/plugins/check_url.py", line 178, in <module>
sys.exit(main())
^^^^^^
File "/home/duncan/git/igwn-monitoring-plugins/igwn_monitor/plugins/check_url.py", line 144, in main
status, message, detail = check_url(
^^^^^^^^^^
File "/home/duncan/git/igwn-monitoring-plugins/igwn_monitor/plugins/check_url.py", line 45, in check_url
resp = get_with_auth(
^^^^^^^^^^^^^^
File "/home/duncan/git/igwn-monitoring-plugins/igwn_monitor/http.py", line 486, in get_with_auth
return get(url, **request_kw)
^^^^^^^^^^^^^^^^^^^^^^
File "/home/duncan/git/igwn-monitoring-plugins/igwn_monitor/http.py", line 447, in get_with_any
request_kw["auth"] = IgwnOmniAuth(
^^^^^^^^^^^^^
File "/home/duncan/git/igwn-monitoring-plugins/igwn_monitor/http.py", line 214, in __init__
HTTPSPNEGOAuth.__init__(self, **spnego_kw)
TypeError: HTTPKerberosAuth.__init__() got an unexpected keyword argument 'opportunistic_auth'
The opportunistic_auth
keyword argument is not supported in requests-kerberos
(it supports something similar called force_preemptive
).
However, the default for that argument is what we set our default to, so we can probably just remove the offending setdefault
call.