[PyQt] Breaking the authenticationRequired loop in QNetworkAccessManager

Brian Zambrano brianz at gmail.com
Thu Aug 6 06:46:21 BST 2009


Hi all,

I'm working with a webservice which requires a valid
username/password.  From PyQt, I'm accessing the webservice using
QNetworkAccessManager which emits the "authenticationRequired
(QNetworkReply*, QAuthenticator*)" signal when (obviously),
authentication is required.  When I fill in the user and psswd for
QAuthenticator, everything works fine.  However, I can't see how to
break the look when the user is *not* valid.

>From the docs for authenticationRequired:

"If it rejects the credentials, this signal will be emitted again."

For invalid credentials this signal is emitted again, and again, and
again....looking at the error code in the reply showed 0.  How is this
case supposed to be handled so it terminates with an error?

Thanks,
BZ


More information about the PyQt mailing list