From 23ec64bbb0a03be0ffdc60b4c27837a0169bda5c Mon Sep 17 00:00:00 2001 From: Samuel Loury Date: Thu, 8 Feb 2024 10:30:04 +0100 Subject: [PATCH] refactor: Make the CommandNotFound more idiomatic --- clk/overloads.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clk/overloads.py b/clk/overloads.py index a731699..13ad987 100644 --- a/clk/overloads.py +++ b/clk/overloads.py @@ -31,7 +31,10 @@ class CommandNotFound(Exception): - pass + + def __init__(self, cmd_name): + super().__init__(f"Command {cmd_name} not found") + self.cmd_name = cmd_name def list_commands(parent_path):