Skip to content

Commit

Permalink
shfqa_sweeper to raise ToolkitError instead of RuntimeError
Browse files Browse the repository at this point in the history
  • Loading branch information
markheik committed Apr 17, 2023
1 parent 8e931ce commit 3fca1ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/zhinst/toolkit/driver/modules/shfqa_sweeper.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
from pathlib import Path

import numpy as np
from zhinst.core import ziDAQServer
from zhinst.utils.shf_sweeper import AvgConfig, EnvelopeConfig, RfConfig
from zhinst.utils.shf_sweeper import ShfSweeper as CoreSweeper
from zhinst.utils.shf_sweeper import SweepConfig, TriggerConfig
from zhinst.core import ziDAQServer

from zhinst.toolkit.driver.parsers import Parse
from zhinst.toolkit.exceptions import ToolkitError
from zhinst.toolkit.nodetree import Node, NodeTree
from zhinst.toolkit.nodetree.connection_dict import ConnectionDict
from zhinst.toolkit.nodetree.helper import NodeDoc
Expand Down Expand Up @@ -195,7 +196,7 @@ def _update_settings(self) -> None:
Converts the nodetree into a valid configuration for the SHFSweeper.
"""
if not self.device():
raise RuntimeError(
raise ToolkitError(
"The device serial needs to be set before using the module."
)
data = OrderedDict()
Expand Down

0 comments on commit 3fca1ed

Please sign in to comment.