New submission from jurjen Bos <j.bos-inter...@xs4all.nl>: If you use an authentication manager from urllib2, it will submit user code and password if authentication fails. However, if the password is wrong, the authentication manager will happily try again, again with the same password. A simple way to circumvent this is attached: it modifies the password manager's behaviour to submit each password only once. One problem I see is in cases where a program needs to log in multiple times in the same site: I propose an extra call to the password manager to reset the "visited" flag.
More details and sample code are in the file. ---------- components: Library (Lib) files: circumvent.py messages: 107009 nosy: Jurjen priority: normal severity: normal status: open title: urllib2 authentication manager retries forever if password is wrong type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file17545/circumvent.py _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue8894> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com