Don't try to iterate over auth info

This caused a crash when trying to use a proxy with authentication on QtWebKit.
It was introduced in 3a5241b642 since it was a
namedtuple before and was iterable like this.
This commit is contained in:
Florian Bruhin 2018-11-26 23:30:55 +01:00
parent e851480a2b
commit 06afd3604e

View File

@ -297,9 +297,9 @@ class NetworkManager(QNetworkAccessManager):
"""Called when a proxy needs authentication."""
proxy_id = ProxyId(proxy.type(), proxy.hostName(), proxy.port())
if proxy_id in _proxy_auth_cache:
user, password = _proxy_auth_cache[proxy_id]
authenticator.setUser(user)
authenticator.setPassword(password)
authinfo = _proxy_auth_cache[proxy_id]
authenticator.setUser(authinfo.user)
authenticator.setPassword(authinfo.password)
else:
msg = '<b>{}</b> says:<br/>{}'.format(
html.escape(proxy.hostName()),