From 109771fcad5f255da175b230a28f67e8afd40568 Mon Sep 17 00:00:00 2001 From: kdsudac Date: Thu, 28 Dec 2017 15:07:24 -0800 Subject: [PATCH] Fix missing test in get_attachment and get_measurement (#686) Fix bug introduced when backporting get_attachment and get_measurements. Fixes traceback when the requested attachment or measurement is missing. --- openhtf/core/test_state.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openhtf/core/test_state.py b/openhtf/core/test_state.py index 95c4ab4d0..3b9da6afa 100644 --- a/openhtf/core/test_state.py +++ b/openhtf/core/test_state.py @@ -173,7 +173,7 @@ def get_attachment(self, attachment_name): return copy.deepcopy(attachment) - test.logger.warning('Could not find attachment: %s', attachment_name) + self.logger.warning('Could not find attachment: %s', attachment_name) return None def get_measurement(self, measurement_name): @@ -204,7 +204,7 @@ def get_measurement(self, measurement_name): measurement = phase_record.measurements[measurement_name] return ImmutableMeasurement.FromMeasurement(measurement) - test.logger.warning('Could not find measurement: %s', measurement_name) + self.logger.warning('Could not find measurement: %s', measurement_name) return None @contextlib.contextmanager