Commit e35c202d authored by Peter Hutterer's avatar Peter Hutterer

tools: handle missing evdev/pyudev modules with a better error message

Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
(cherry picked from commit 67bfb5cf)
parent 1593d7da
......@@ -26,9 +26,15 @@
import sys
import argparse
import evdev
import evdev.ecodes
import pyudev
try:
import evdev
import evdev.ecodes
import pyudev
except ModuleNotFoundError as e:
print('Error: {}'.format(str(e)), file=sys.stderr)
print('One or more python modules are missing. Please install those '
'modules and re-run this tool.')
sys.exit(1)
class Range(object):
......
......@@ -26,9 +26,15 @@
import sys
import argparse
import evdev
import evdev.ecodes
import pyudev
try:
import evdev
import evdev.ecodes
import pyudev
except ModuleNotFoundError as e:
print('Error: {}'.format(str(e)), file=sys.stderr)
print('One or more python modules are missing. Please install those '
'modules and re-run this tool.')
sys.exit(1)
class Range(object):
......
......@@ -26,9 +26,15 @@
import sys
import argparse
import evdev
import evdev.ecodes
import pyudev
try:
import evdev
import evdev.ecodes
import pyudev
except ModuleNotFoundError as e:
print('Error: {}'.format(str(e)), file=sys.stderr)
print('One or more python modules are missing. Please install those '
'modules and re-run this tool.')
sys.exit(1)
MINIMUM_EVENT_COUNT = 1000
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment