Skip to content

check_command

appimage_updater.commands.check_command

Check command implementation.

CheckCommand(params)

Command to check for application updates.

Source code in src/appimage_updater/commands/check_command.py
def __init__(self, params: CheckParams):
    self.params = params
    self.console = Console()

console = Console() instance-attribute

params = params instance-attribute

execute(http_tracker=None, output_formatter=None) async

Execute the check command.

Parameters:

Name Type Description Default
http_tracker Any

Optional HTTP tracker for instrumentation

None
output_formatter Any

Optional output formatter for display

None
Source code in src/appimage_updater/commands/check_command.py
async def execute(self, http_tracker: Any = None, output_formatter: Any = None) -> CommandResult:
    """Execute the check command.

    Args:
        http_tracker: Optional HTTP tracker for instrumentation
        output_formatter: Optional output formatter for display
    """
    configure_logging(debug=self.params.debug)

    try:
        self._start_http_tracking(http_tracker)

        try:
            success = await self._execute_check_operation(output_formatter)
            self._display_http_tracking_summary(http_tracker, output_formatter)
            return self._create_result(success)

        finally:
            self._stop_http_tracking(http_tracker)

    except Exception as e:
        logger.error(f"Unexpected error in check command: {e}")
        logger.exception("Full exception details")
        return CommandResult(success=False, message=str(e), exit_code=1)

validate()

Validate command parameters.

Source code in src/appimage_updater/commands/check_command.py
def validate(self) -> list[str]:
    """Validate command parameters."""
    # Check command has no required parameters
    return []