From e38e5ca37a0d2732a8a99b22885297fd3017e3fe Mon Sep 17 00:00:00 2001 From: Martin Teichmann <martin.teichmann@xfel.eu> Date: Thu, 7 Sep 2023 11:41:43 +0200 Subject: [PATCH] raise EtherCatError, not RuntimeError --- ebpfcat/ebpfcat.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ebpfcat/ebpfcat.py b/ebpfcat/ebpfcat.py index f5d688f..f5d1ac3 100644 --- a/ebpfcat/ebpfcat.py +++ b/ebpfcat/ebpfcat.py @@ -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 = {} -- GitLab