[ python-Bugs-1690840 ] xmlrpclib methods submit call on __str__, __repr__
SourceForge.net
noreply at sourceforge.net
Fri Mar 30 04:59:03 CEST 2007
Bugs item #1690840, was opened at 2007-03-29 15:14
Message generated for change (Comment added) made by collinwinter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1690840&group_id=5470
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Greg Hazel (ghazel)
Assigned to: Nobody/Anonymous (nobody)
Summary: xmlrpclib methods submit call on __str__, __repr__
Initial Comment:
Notice how trying to print a method causes it to submit the call:
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from xmlrpclib import ServerProxy
>>> s = ServerProxy("http://google.com")
>>> print s.somecall
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\python25\lib\xmlrpclib.py", line 1147, in __call__
return self.__send(self.__name, args)
File "c:\python25\lib\xmlrpclib.py", line 1437, in __request
verbose=self.__verbose
File "c:\python25\lib\xmlrpclib.py", line 1191, in request
headers
xmlrpclib.ProtocolError: <ProtocolError for google.com/RPC2: 501 Not Implemented
Similarly:
>>> f = s.somecall
>>> locals()
{'f': Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "c:\python25\lib\xmlrpclib.py", line 1147, in __call__
return self.__send(self.__name, args)
File "c:\python25\lib\xmlrpclib.py", line 1437, in __request
verbose=self.__verbose
File "c:\python25\lib\xmlrpclib.py", line 1191, in request
headers
xmlrpclib.ProtocolError: <ProtocolError for google.com/RPC2: 501 Not Implemented>
----------------------------------------------------------------------
>Comment By: Collin Winter (collinwinter)
Date: 2007-03-29 22:59
Message:
Logged In: YES
user_id=1344176
Originator: NO
What would you rather seem them print?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1690840&group_id=5470
More information about the Python-bugs-list
mailing list