[issue243] if http authentication fails an uncaught exception will be thrown and then smart hangs

Peter Warasin at Labix Tracker tracker at labix.org
Wed Nov 8 18:28:08 PST 2006


New submission from Peter Warasin <peter at endian.it>:

if HTTP basic authentication fails smartpm will throw an unhandled exception and
then hangs.

the exception:
  File "/usr/lib/python2.4/urllib.py", line 652, in retry_http_basic_auth
    user, passwd = self.get_user_passwd(host, realm, i)
TypeError: get_user_passwd() takes exactly 3 arguments (4 given)


i have this problem on a RHEL4.4 which has a patched python 2.4.3. i also
applied this patch http://tracker.labix.org/issue171, but it should not cause
the problem.

the problem happens because the interface of the method get_user_passwd() of
that python version is as follows:

    def get_user_passwd(self, host, realm, clear_cache = 0):

but will be overridden by fetcher.py with the following:

            def get_user_passwd(self, host, realm):

so the method definition differs, which cause the exception.

i don't know if other python versions have a different definition of
get_user_passwd(), which then may be compatible with smartpm's override. 

however, i add a patch here, which solves the problem. since the additional
parameter is set 0, it should not break other versions which have less parameters.

----------
files: smart-0.42-get_user_passwd-interface-python2.4.3.patch
messages: 910
nosy: peter-endian
priority: bug
project: smart
status: unread
title: if http authentication fails an uncaught exception will be thrown and then smart hangs

_______________________________________
Labix issue tracker <tracker at labix.org>
<http://tracker.labix.org/issue243>
_______________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smart-0.42-get_user_passwd-interface-python2.4.3.patch
Type: text/x-patch
Size: 676 bytes
Desc: not available
URL: <http://lists.labix.org/pipermail/smart-labix.org/attachments/20061109/dcead4da/attachment-0002.bin>


More information about the Smart mailing list