Skip to content

Fix: Corrected color formatting in interface status output#479

Open
c0dew3ll wants to merge 1 commit intokimocoder:masterfrom
c0dew3ll:bugfix/fix-rendering-in-syscheck
Open

Fix: Corrected color formatting in interface status output#479
c0dew3ll wants to merge 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

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.

1 participant