From ed445982b829e101be958eba32acbe639e8ae90a Mon Sep 17 00:00:00 2001 From: ugol-1 <140963103+ugol-1@users.noreply.github.com> Date: Fri, 20 Sep 2024 22:58:24 +0200 Subject: [PATCH] check_set_camera_info() code clean-up (#1034) Removed the unnecessary `if response.status_message is not None` checks Co-authored-by: ugol-1 --- .../src/camera_calibration/camera_calibrator.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/camera_calibration/src/camera_calibration/camera_calibrator.py b/camera_calibration/src/camera_calibration/camera_calibrator.py index cb12fc37..77bc74e2 100755 --- a/camera_calibration/src/camera_calibration/camera_calibrator.py +++ b/camera_calibration/src/camera_calibration/camera_calibrator.py @@ -214,14 +214,12 @@ def check_set_camera_info(self, response): for i in range(10): print("!" * 80) print() - print("Attempt to set camera info failed: " + response.status_message - if response.status_message is not None else "Not available") + print(f"Attempt to set camera info failed: {response.status_message}") print() for i in range(10): print("!" * 80) print() - self.get_logger().error('Unable to set camera info for calibration. Failure message: %s' % - response.status_message if response.status_message is not None else "Not available") + self.get_logger().error(f'Unable to set camera info for calibration. Failure message: {response.status_message}') return False def do_upload(self):