Skip to content
Snippets Groups Projects
Commit e38e5ca3 authored by Martin Teichmann's avatar Martin Teichmann
Browse files

raise EtherCatError, not RuntimeError

parent 399c53f9
No related branches found
No related tags found
No related merge requests found
......@@ -23,7 +23,7 @@ import os
from struct import pack, unpack, calcsize, pack_into, unpack_from
from time import time
from .arraymap import ArrayMap, ArrayGlobalVarDesc
from .ethercat import ECCmd, EtherCat, Packet, Terminal
from .ethercat import ECCmd, EtherCat, Packet, Terminal, EtherCatError
from .ebpf import FuncId, MemoryDesc, SubProgram, prandom
from .xdp import XDP, XDPExitCode, PacketVar as XDPPacketVar
from .bpf import (
......@@ -244,7 +244,7 @@ class EBPFTerminal(Terminal):
await super().apply_eeprom()
if (self.compatibility is not None and
(self.vendorId, self.productCode) not in self.compatibility):
raise RuntimeError(
raise EtherCatError(
f"Incompatible Terminal: {self.vendorId}:{self.productCode}")
await self.to_operational(2)
self.pdos = {}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment