Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kernel-hardening-checker
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fact-depend
kernel-hardening-checker
Commits
374aee30
Commit
374aee30
authored
Sep 11, 2023
by
Frak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix pylints and verbose/None case
parent
05567f06
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
engine.py
kconfig_hardened_check/engine.py
+7
-5
No files found.
kconfig_hardened_check/engine.py
View file @
374aee30
...
@@ -15,14 +15,16 @@ GREEN_COLOR = '\x1b[32m'
...
@@ -15,14 +15,16 @@ GREEN_COLOR = '\x1b[32m'
RED_COLOR
=
'
\x1b
[31m'
RED_COLOR
=
'
\x1b
[31m'
COLOR_END
=
'
\x1b
[0m'
COLOR_END
=
'
\x1b
[0m'
def
colorize_result
(
input
):
def
colorize_result
(
input_text
):
if
input
.
startswith
(
'OK'
):
if
input_text
is
None
:
return
input_text
if
input_text
.
startswith
(
'OK'
):
color
=
GREEN_COLOR
color
=
GREEN_COLOR
elif
input
.
startswith
(
'FAIL:'
):
elif
input
_text
.
startswith
(
'FAIL:'
):
color
=
RED_COLOR
color
=
RED_COLOR
else
:
else
:
assert
(
False
),
f
'unexpected result "{input}"'
assert
(
False
),
f
'unexpected result "{input
_text
}"'
return
f
'{color}{input}{COLOR_END}'
return
f
'{color}{input
_text
}{COLOR_END}'
class
OptCheck
:
class
OptCheck
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment