Skip to content

Commit

Permalink
find_zsync_worker_port to raise ToolkitError
Browse files Browse the repository at this point in the history
  • Loading branch information
markheik committed Feb 10, 2023
1 parent ef120dd commit 9d227c0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/zhinst/toolkit/driver/devices/pqsc.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from typing import List, Union

from zhinst.toolkit.driver.devices.base import BaseInstrument
from zhinst.toolkit.exceptions import ToolkitError


logger = logging.getLogger(__name__)
Expand Down Expand Up @@ -233,7 +234,7 @@ def find_zsync_worker_port(self, device: BaseInstrument) -> int:
Integer value represent the ID of the searched PQSC Zsync port.
Raises:
RuntimeError: If the given device doesn't appear to be connected
ToolkitError: If the given device doesn't appear to be connected
to the PQSC via ZSync.
.. versionadded:: 0.5.1
Expand All @@ -248,7 +249,7 @@ def find_zsync_worker_port(self, device: BaseInstrument) -> int:
try:
device_zsync_node = serial_to_node_dict[device_serial]
except KeyError:
raise RuntimeError(
raise ToolkitError(
"No ZSync connection found between the PQSC "
f"{self.serial} and the device {device.serial}."
)
Expand Down

0 comments on commit 9d227c0

Please sign in to comment.