Skip to content

🕵️‍♂️ (2-in-1) Email & Username OSINT suite featuring native MCP support for deep data extraction just from a single Email/Username. Analyzes 2720+ actively maintained scan vectors (210+ email / 2510+ username) for security research, investigations, and digital footprinting.

fix: correct Fore.reset typo crashing update error handler

A-S-Manoj3a783d6deba2
diff --git a/tests/test_update.py b/tests/test_update.py
index 3d3d33c..ce8e18f 100644
--- a/tests/test_update.py
+++ b/tests/test_update.py
@@ -1,5 +1,6 @@
from user_scanner.core import helpers as hl
-
+from user_scanner.utils import update as upd
+import subprocess
def test_default_config():
configs = hl.load_config()
@@ -29,3 +30,20 @@ def test_config_set(tmp_path, monkeypatch):
hl.save_config_value("auto_update_status", True)
assert get_status() is True
+
+def test_update_self_prints_message_on_install_failure(monkeypatch, capsys):
+ calls = []
+
+ def fake_check_call(cmd, *a, **kw):
+ calls.append(cmd)
+ if "uninstall" in cmd:
+ return 0
+ raise subprocess.CalledProcessError(1, cmd)
+
+ monkeypatch.setattr(subprocess, "check_call", fake_check_call)
+
+ upd.update_self()
+
+ out = capsys.readouterr().out
+ assert "Failed to update user-scanner" in out
+ assert len(calls) == 2 # uninstall attempted, then install attempted
diff --git a/user_scanner/utils/update.py b/user_scanner/utils/update.py
index 8228d69..ad94a14 100644
--- a/user_scanner/utils/update.py
+++ b/user_scanner/utils/update.py
@@ -19,7 +19,7 @@ def update_self():
sys.executable, "-m", "pip", "install", "user-scanner"
])
except subprocess.CalledProcessError as e:
- print(f"{Fore.RED}Failed to update user-scanner: {e}{Fore.reset}")
+ print(f"{Fore.RED}Failed to update user-scanner: {e}{Fore.RESET}")
return