Skip to content

Commit 9c2e42d

Browse files
committed
include object/uri info in error description when nothing is exposed. Fixes # 97
1 parent 0522fe0 commit 9c2e42d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Pyro5/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ def __processMetadata(self, metadata):
413413
log.debug("from meta: methods=%s, oneway methods=%s, attributes=%s",
414414
sorted(self._pyroMethods), sorted(self._pyroOneway), sorted(self._pyroAttrs))
415415
if not self._pyroMethods and not self._pyroAttrs:
416-
raise errors.PyroError("remote object doesn't expose any methods or attributes. Did you forget setting @expose on them?")
416+
raise errors.PyroError("remote object '%s' doesn't expose any methods or attributes. Did you forget setting @expose on them?" % self._pyroUri)
417417

418418
def _pyroReconnect(self, tries=100000000):
419419
"""

Pyro5/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def get_metadata(self, objectId):
168168
metadata = _get_exposed_members(obj)
169169
if not metadata["methods"] and not metadata["attrs"]:
170170
# Something seems wrong: nothing is remotely exposed.
171-
warnings.warn("Class %r doesn't expose any methods or attributes. Did you forget setting @expose on them?" % type(obj))
171+
warnings.warn("Class %s doesn't expose any methods or attributes. Did you forget setting @expose on them?" % repr(obj))
172172
return metadata
173173
else:
174174
log.debug("unknown object requested: %s", objectId)

0 commit comments

Comments
 (0)