Skip to content

Commit

Permalink
fix(cli): use getattr with default to retrieve __notes__
Browse files Browse the repository at this point in the history
  • Loading branch information
loqusion committed May 7, 2024
1 parent 4fd96d2 commit 8119181
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hyprshade/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def main(): # pragma: no cover
f"{click.style('Error', fg='red')}: {click.style(message, bold=True)}",
err=True,
)
if e.__notes__:
if getattr(e, "__notes__", None):
for note in e.__notes__:
click.echo(f"{click.style('Note', bold=True)}: {note}", err=True)
click.secho("Use --verbose to see the full traceback", fg="yellow", err=True)
Expand Down

0 comments on commit 8119181

Please sign in to comment.