mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-05 05:28:02 +02:00
scanner: don't allow incoming/outgoing for modes other than ei/eis
We support mode "brei" now but that doesn't have a definition of incoming or outgoing.
This commit is contained in:
parent
0e70d06706
commit
381bc9222a
1 changed files with 10 additions and 2 deletions
|
|
@ -292,8 +292,12 @@ class Interface:
|
|||
"""
|
||||
if self.mode == "ei":
|
||||
return self.requests # type: ignore
|
||||
else:
|
||||
elif self.mode == "eis":
|
||||
return self.events # type: ignore
|
||||
else:
|
||||
raise NotImplementedError(
|
||||
f"Interface.outgoing is not supported for mode {self.mode}"
|
||||
)
|
||||
|
||||
@property
|
||||
def incoming(self) -> list[Message]:
|
||||
|
|
@ -306,8 +310,12 @@ class Interface:
|
|||
"""
|
||||
if self.mode == "ei":
|
||||
return self.events # type: ignore
|
||||
else:
|
||||
elif self.mode == "eis":
|
||||
return self.requests # type: ignore
|
||||
else:
|
||||
raise NotImplementedError(
|
||||
f"Interface.incoming is not supported for mode {self.mode}"
|
||||
)
|
||||
|
||||
@property
|
||||
def ctype(self) -> str:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue