Commit 55914149 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

scripts: exit with 77 if python-libevdev is missing

This way we pass make check/ninja test even where the module is not available

See !31 (comment 879823)

Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
parent 25f3278b
Pipeline #302460 passed with stages
in 2 minutes and 10 seconds
......@@ -16,10 +16,20 @@ import logging
import os
import sys
import re
import libevdev
import subprocess
from pathlib import Path
try:
import libevdev
except ModuleNotFoundError as e:
print(f"Error: {e}", file=sys.stderr)
print(
"One or more python modules are missing. Please install those "
"modules and re-run this tool."
)
sys.exit(77)
logging.basicConfig(level=logging.DEBUG, format="%(levelname)s: %(message)s")
logger = logging.getLogger("ksgen")
......
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