From d05fb0ded0cb1228c95c2aface0129524a82e831 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Fri, 22 Feb 2019 11:39:38 -0800 Subject: mpm: rpc_server: Improve error message on double-claim The error message will now include the IP address of the client trying to double-claim a device. --- mpm/python/usrp_mpm/rpc_server.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mpm/python') diff --git a/mpm/python/usrp_mpm/rpc_server.py b/mpm/python/usrp_mpm/rpc_server.py index 35202efa9..c67bf769b 100644 --- a/mpm/python/usrp_mpm/rpc_server.py +++ b/mpm/python/usrp_mpm/rpc_server.py @@ -268,8 +268,11 @@ class MPMServer(RPCServer): """ self._state.lock.acquire() if self._state.claim_status.value: - self.log.warning("Someone tried to claim this device again") - self._last_error = "Someone tried to claim this device again" + error_msg = \ + "Someone tried to claim this device again (From: {})".format( + self.client_host) + self.log.warning(error_msg) + self._last_error = error_msg self._state.lock.release() raise RuntimeError("Double-claim") self.log.debug( -- cgit v1.2.3