From 91135bdf5fc6a65dca8a08a227dbc20017130764 Mon Sep 17 00:00:00 2001 From: Hardik Zinzuvadiya <25708027+Z4nzu@users.noreply.github.com> Date: Sun, 15 Mar 2026 18:41:32 +0530 Subject: [PATCH] Fix is_installed crash on sub-collections (OtherTools) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OtherTools.TOOLS contains HackingToolsCollection instances (like SocialMediaBruteforceTools) which don't have the is_installed property. - Guard is_installed access with hasattr() in both the status column and the not_installed count for Install All - Sub-collections show blank status; individual tools show ✔/✘ --- core.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core.py b/core.py index 0dabf7a..88d7e9a 100644 --- a/core.py +++ b/core.py @@ -373,11 +373,12 @@ class HackingToolsCollection: for index, tool in enumerate(active, start=1): desc = getattr(tool, "DESCRIPTION", "") or "—" desc = desc.splitlines()[0] if desc != "—" else "—" - status = "[green]✔[/green]" if tool.is_installed else "[dim]✘[/dim]" + has_status = hasattr(tool, "is_installed") + status = ("[green]✔[/green]" if tool.is_installed else "[dim]✘[/dim]") if has_status else "" table.add_row(str(index), status, tool.TITLE, desc) - # Count not-installed tools for "Install All" label - not_installed = [t for t in active if not t.is_installed] + # Count not-installed tools for "Install All" label (skip sub-collections) + not_installed = [t for t in active if hasattr(t, "is_installed") and not t.is_installed] if not_installed: table.add_row( "[bold green]97[/bold green]", "",