diff --git a/src/rqt_logger_level/logger_level_service_caller.py b/src/rqt_logger_level/logger_level_service_caller.py index 5b53896..ede1441 100644 --- a/src/rqt_logger_level/logger_level_service_caller.py +++ b/src/rqt_logger_level/logger_level_service_caller.py @@ -113,7 +113,11 @@ def send_logger_change_message(self, node, logger, level): if self._current_levels[logger].lower() == level.lower(): return False - service = rosservice.get_service_class_by_name(servicename) + try: + service = rosservice.get_service_class_by_name(servicename) + except rosservice.ROSServiceException as e: + qWarning('Failed to set logger level: %s' % e) + return False request = service._request_class() setattr(request, 'logger', logger) setattr(request, 'level', level)