_get_rpc returns a reference to the unrelated method of the ServerProxy supervisor. An exception does not occur when calling _get_rpc, where you handle it; this happens when you try to evaluate this supervisor method (in "if not rpc"). Try the interactive prompt:
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import xmlrpclib >>> xmlrpclib.ServerProxy("http://127.0.0.1"); <ServerProxy for 127.0.0.1/RPC2> >>> xmlrpclib.ServerProxy("http://127.0.0.1").supervisor; Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__ return self.__send(self.__name, args) File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request verbose=self.__verbose File "/usr/lib/python2.6/xmlrpclib.py", line 1243, in request headers xmlrpclib.ProtocolError: <ProtocolError for 127.0.0.1/RPC2: 404 Not Found> >>> foo = xmlrpclib.ServerProxy("http://127.0.0.1"); >>> dir (foo) ['_ServerProxy__allow_none', '_ServerProxy__encoding', '_ServerProxy__handler', '_ServerProxy__host', '_ServerProxy__request', '_ServerProxy__transport', '_ServerProxy__verbose', '__doc__', '__getattr__', '__init__', '__module__', '__repr__', '__str__'] >>> foo.supervisor Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__ return self.__send(self.__name, args) File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request verbose=self.__verbose File "/usr/lib/python2.6/xmlrpclib.py", line 1243, in request headers xmlrpclib.ProtocolError: <ProtocolError for 127.0.0.1/RPC2: 404 Not Found> >>> bar = foo.supervisor >>> bar Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib/python2.6/xmlrpclib.py", line 1199, in __call__ return self.__send(self.__name, args) File "/usr/lib/python2.6/xmlrpclib.py", line 1489, in __request verbose=self.__verbose File "/usr/lib/python2.6/xmlrpclib.py", line 1243, in request headers xmlrpclib.ProtocolError: <ProtocolError for 127.0.0.1/RPC2: 404 Not Found>
Note how you see the exception when trying to evaluate the .supervisor method (ServerProxy (...). Supervisor, foo.supervisor or bar), but not only when you assign it elsewhere (bar = foo.supervisor).