Skip to content

Commit

Permalink
Fix checking if sensor and sigan cal files are set.
Browse files Browse the repository at this point in the history
  • Loading branch information
dboulware committed Jan 5, 2024
1 parent d47d763 commit fd5eaa5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions scos_actions/calibration/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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."
Expand Down

0 comments on commit fd5eaa5

Please sign in to comment.