Skip to content

Fix: Corrected color formatting in interface status output#479

Merged
kimocoder merged 1 commit intokimocoder:masterfrom
c0dew3ll:bugfix/fix-rendering-in-syscheck
Apr 9, 2026
Merged

Fix: Corrected color formatting in interface status output#479
kimocoder merged 1 commit intokimocoder:masterfrom
c0dew3ll:bugfix/fix-rendering-in-syscheck

Conversation

@c0dew3ll
Copy link
Copy Markdown

@c0dew3ll c0dew3ll commented Apr 4, 2026

Issue:
The interface status line was displaying literal curly braces around the "Up" status (e.g., Up: {}no{}) instead of applying the intended colors.

Cause:
The issue was caused by an f-string escaping conflict. Inside the f-string's expression block (the inline if/else), double curly braces {{O}} were being treated as literal characters rather than being unescaped. This resulted in the Color.pl method receiving {{O}}no{{W}} and failing to parse the color codes correctly, leaving the outer braces visible in the terminal.

Changes:

Removed unnecessary double braces inside the f-string's conditional logic for the iface.is_up check.

Verified that the status now correctly displays as colored text (Green "yes" / Orange "no") without visible brackets.

Before:
before

After:
after

@kimocoder
Copy link
Copy Markdown
Owner

I will review this PR later today 🥇

@claude
Copy link
Copy Markdown

claude Bot commented Apr 9, 2026

Claude Code is working…

I'll analyze this and get back to you.

View job run

@kimocoder kimocoder merged commit 941e07f into kimocoder:master Apr 9, 2026
15 of 18 checks passed
@kimocoder
Copy link
Copy Markdown
Owner

Tested and merged. Thanks!

@claude
Copy link
Copy Markdown

claude Bot commented Apr 9, 2026

Claude finished @kimocoder's task in 29s —— View job


PR Review: Fix color formatting in interface status output

The fix is correct and clean. Here's a quick summary:

The Bug (wifite/util/system_check.py:719)

Inside an f-string expression block, double braces like {{G}} are interpreted as literal {G} text — they don't get further processed by Color.pl. So the original code was passing the string {G}yes{W} as literal characters including the braces to Color.pl, which then couldn't match the color codes correctly, producing output like Up: {}no{}.

The Fix

Changing {{G}}yes{{W}} to {G}yes{W} inside the f-string conditional is correct. Since these strings are inside an expression ({...}) in the f-string, they're just regular string literals — no escaping needed. Color.pl receives the string exactly as written and can parse the color codes properly.

Result: Up: now correctly displays green yes or orange no instead of raw unrendered color tags.

Minimal, targeted, correct fix. Good work to @c0dew3ll!


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants