We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed32bfd commit a5152cdCopy full SHA for a5152cd
src/busylight/subcommands/udev_rules.py
@@ -21,10 +21,14 @@ def generate_udev_rules(
21
"""
22
logger.info(f"generating udev rules: {output}")
23
24
- rules = Light.udev_rules()
25
- about = [
26
- "# Generated by `busylight udev-rules` https://github.com/JnyJny/busylight",
27
- "#",
28
- ]
+ try:
+ rules = Light.udev_rules()
+ about = [
+ "# Generated by `busylight udev-rules` https://github.com/JnyJny/busylight",
+ "#",
29
+ ]
30
+ except Exception as error:
31
+ typer.secho(f"Error generating udev rules: {error}", fg="red")
32
+ raise typer.Exit(code=1)
33
34
print("\n".join(about + rules), file=output)
0 commit comments