"""Abstract class to define all main function logic."""importtracebackfromabcimportABC,abstractmethod
[docs]classBaseCommand(ABC):"""An abstract class for all the command classes to inherit from"""
[docs]defexecute(self,config)->None:"""Runs the command"""try:self._execute_command(config)exceptExceptionase:print(f"Error during command: {self.__class__.__name__}: {e}")traceback.print_exc()raise