diff --git a/rclpy/rclpy/exceptions.py b/rclpy/rclpy/exceptions.py index c4b1baca8..3a3bb6a18 100644 --- a/rclpy/rclpy/exceptions.py +++ b/rclpy/rclpy/exceptions.py @@ -71,7 +71,7 @@ class ParameterException(Exception): """Base exception for parameter-related errors.""" def __init__(self, error_msg, parameters, *args): - Exception.__init__(self, '{error_msg}: {parameters}'.format(error_msg, parameters), *args) + Exception.__init__(self, f'{error_msg}: {parameters}') class ParameterNotDeclaredException(ParameterException):