Skip to content

Commit

Permalink
Catch AttributeError if TLParamsLocked not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangNara committed Apr 7, 2022
1 parent 5fabe6d commit 3a67b53
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/harvesters/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -2109,6 +2109,8 @@ def start(self, *, run_as_thread: bool = False) -> None:
except GenTL_GenericException:
# SFNC < 2.0
pass
except AttributeError:
_logger.warning("TLParamsLocked not exist.")

ds.start_acquisition(
ACQ_START_FLAGS_LIST.ACQ_START_FLAGS_DEFAULT, -1)
Expand Down Expand Up @@ -2491,6 +2493,8 @@ def stop(self) -> None:
self.remote_device.node_map.TLParamsLocked.value = 0
except GenApi_GenericException:
pass
except AttributeError:
_logger.warning("TLParamsLocked not exist.")

for data_stream in self._data_streams:
try:
Expand Down

0 comments on commit 3a67b53

Please sign in to comment.