We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if I get passed a ServerProxy object to a function, there's no way for me to get it's address other than creating, catching and parsing an exception.
ServerProxy
>>> some_server = fastrpc.ServerProxy('http://wanted.com:2250/RPC2') >>> some_server <ServerProxy object at 0xe98ea0> >>> dir(some_server) ['host', 'last_call', 'path', 'port', 'url'] >>> some_server.url <Method object at 0x7fca6f1b5f10> >>> some_server.url() Traceback (most recent call last): File "<input>", line 1, in <module> Fault: <fastrpc.Fault: 404, mtd: object does/does not exist: Nor default method nor method of such name are registered: url [method url() @ http://wanted.com:2250/RPC2]> >>> some_server.host <Method object at 0xf621f0> >>> some_server.host() Traceback (most recent call last): File "<input>", line 1, in <module> Fault: <fastrpc.Fault: 404, mtd: object does/does not exist: Nor default method nor method of such name are registered: host [method host() @ http://wanted.com:2250/RPC2]> >>> repr(some_server) '<ServerProxy object at 0xe98ea0>' >>> str(some_server) Traceback (most recent call last): File "<input>", line 1, in <module> TypeError: 'str' object is not callable # The only solution for now, other than wrapping it >>> try: ... some_server.no_method() ... except fastrpc.Fault as e: ... print(repr(e).split('@')[1].split(']')[0]) http://wanted.com:2250/RPC2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
if I get passed a
ServerProxy
object to a function, there's no way for me to get it's address other than creating, catching and parsing an exception.The text was updated successfully, but these errors were encountered: