refactor(quality): clean up unused imports, variables, and redundant f-strings
CI Test Suite / Run Component Tests & Pipeline Verification (push) Successful in 1m36s
Release Binaries & Packages / Build & Release Standalone Binaries (Linux & Windows Cross-Compilation) (push) Successful in 1m14s

This commit is contained in:
2026-09-26 13:43:01 +02:00
parent 96126cdf84
commit d025689193
4 changed files with 5 additions and 7 deletions
-1
View File
@@ -6,7 +6,6 @@ Repo: https://gitea.eibl.tech/me0nline/LOGAR-LICENSING.git
"""
import os
import sys
import importlib.util
ROOT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))
+1 -1
View File
@@ -9,7 +9,7 @@ import subprocess
import urllib.request
import warnings
from datetime import datetime, timezone, timedelta
from typing import Optional, Dict, Any, List
from typing import Optional
# Suppress cryptography / pgpy deprecation notices
warnings.filterwarnings("ignore")
+3 -4
View File
@@ -443,7 +443,7 @@ def load_or_init_config(config_path: str = CONFIG_FILE_NAME) -> Dict[str, Any]:
with open(config_path, "w", encoding="utf-8") as f:
json.dump(config, f, indent=2)
print(f"[+] Successfully generated new server config and OpenPGP keypair.")
print("[+] Successfully generated new server config and OpenPGP keypair.")
print(f"[+] Server Encryption Fingerprint: {fingerprint}")
print(f"[+] Saved to: {os.path.abspath(config_path)}")
return config
@@ -1896,7 +1896,6 @@ def serve_webui(request: Request = None):
pct = summary["percentage"]
bar_color = "#10b981" if pct < 70 else ("#f59e0b" if pct < 90 else "#ef4444")
badge_status_cls = "badge-active" if summary["status"] == "ACTIVE" else ("badge-warning" if summary["status"] == "SELF-SIGNED" else "badge-revoked")
total_nodes = summary["active_seats"] + summary["revoked_seats"]
detected_host = (request.headers.get("host", "").split(":")[0] if request and request.headers else "") or config.get("tcp_host", "127.0.0.1")
if detected_host in ("0.0.0.0", "localhost", ""):
@@ -2649,7 +2648,7 @@ def main():
force_renew=True
)
print(f"[+] Successfully imported and activated signed license!")
print("[+] Successfully imported and activated signed license!")
print(f" - Granted Seats: {new_seats}")
print(f" - License ID: {res.get('license_id') or info.get('license_id')}")
print(f" - Expires: {info.get('not_valid_after') or res.get('expires_at') or 'N/A'}")
@@ -2722,7 +2721,7 @@ def main():
cert_dir=cert_dir,
force_renew=True
)
print(f"[+] License successfully synchronized with master server!")
print("[+] License successfully synchronized with master server!")
print(f" - Active Seat Quota: {new_seats}")
print(f" - License ID: {info.get('license_id')}")
print(f" - Expires: {info.get('not_valid_after')}")
+1 -1
View File
@@ -8,7 +8,7 @@ import argparse
import urllib.request
import warnings
from datetime import datetime, timezone, timedelta
from typing import Optional, Dict, Any, List
from typing import Optional
# Suppress cryptography / pgpy deprecation notices
warnings.filterwarnings("ignore")