Skip to content

Commit 33c268d

Browse files
committed
FIX: Missing exception class
1 parent f700d88 commit 33c268d

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

‎evdev/device.py‎

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,11 @@
88
from evdev.events import InputEvent
99

1010
try:
11-
from evdev.eventio_async import EventIO
11+
from evdev.eventio_async import EventIO, EvdevError
1212
except ImportError:
13-
from evdev.eventio import EventIO
13+
from evdev.eventio import EventIO, EvdevError
1414

1515

16-
#--------------------------------------------------------------------------
17-
class EvdevError(Exception):
18-
pass
19-
2016
#--------------------------------------------------------------------------
2117
_AbsInfo = collections.namedtuple(
2218
'AbsInfo', ['value', 'min', 'max', 'fuzz', 'flat', 'resolution'])

‎evdev/eventio.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
from evdev import _input, _uinput, ecodes, util
99
from evdev.events import InputEvent
1010

11+
#--------------------------------------------------------------------------
12+
class EvdevError(Exception):
13+
pass
14+
1115

1216
class EventIO(object):
1317
'''

‎evdev/eventio_async.py‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,14 @@
44
import select
55

66
from evdev import eventio
7+
# needed for compatibility
8+
from evdev.eventio import EvdevError
79

810

911
class EventIO(eventio.EventIO):
1012
def _do_when_readable(self, callback):
1113
loop = asyncio.get_event_loop()
14+
1215
def ready():
1316
loop.remove_reader(self.fileno())
1417
callback()

0 commit comments

Comments
 (0)