From fd5eaa5f43564cdbc11d5317bb6e71d22599b246 Mon Sep 17 00:00:00 2001 From: Doug Boulware Date: Fri, 5 Jan 2024 10:14:56 -0700 Subject: [PATCH] Fix checking if sensor and sigan cal files are set. --- scos_actions/calibration/__init__.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scos_actions/calibration/__init__.py b/scos_actions/calibration/__init__.py index 4014a2a0..e78f4c7e 100644 --- a/scos_actions/calibration/__init__.py +++ b/scos_actions/calibration/__init__.py @@ -54,8 +54,10 @@ def check_for_default_calibration(cal_file_path: str, cal_type: str) -> bool: sensor_calibration = None -if SENSOR_CALIBRATION_FILE is None: - logger.warning("Sensor calibration file is None. Not loading calibration file.") +if SENSOR_CALIBRATION_FILE is None or SENSOR_CALIBRATION_FILE == "": + logger.warning( + "No sensor calibration file specified. Not loading calibration file." + ) elif not path.exists(SENSOR_CALIBRATION_FILE): logger.warning( SENSOR_CALIBRATION_FILE @@ -71,8 +73,8 @@ def check_for_default_calibration(cal_file_path: str, cal_type: str) -> bool: sigan_calibration = None default_sensor_calibration = False default_sigan_calibration = False -if SIGAN_CALIBRATION_FILE is None: - logger.warning("Sigan calibration file is None. Not loading calibration file.") +if SIGAN_CALIBRATION_FILE is None or SIGAN_CALIBRATION_FILE == "": + logger.warning("No sigan calibration file specified. Not loading calibration file.") elif not path.exists(SIGAN_CALIBRATION_FILE): logger.warning( SIGAN_CALIBRATION_FILE + " does not exist. Not loading sigan calibration file."