Skip to content

Commit 74ff848

Browse files
committed
addressed mypy issues
1 parent 9a5ce98 commit 74ff848

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

nodescraper/plugins/inband/process/process_analyzer.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ def analyze_data(
5656
args = ProcessAnalyzerArgs()
5757

5858
err_messages = []
59-
if data.kfd_process > args.max_kfd_processes:
59+
if data.kfd_process is not None and data.kfd_process > args.max_kfd_processes:
6060
err_messages.append(
61-
f"Kfd processes {data.kfd_process} exeed max limit {args.max_kfd_processed}"
61+
f"Kfd processes {data.kfd_process} exeed max limit {args.max_kfd_processes}"
6262
)
6363
self._log_event(
6464
category=EventCategory.OS,
@@ -71,7 +71,7 @@ def analyze_data(
7171
console_log=True,
7272
)
7373

74-
if data.cpu_usage > args.max_cpu_usage:
74+
if data.cpu_usage is not None and data.cpu_usage > args.max_cpu_usage:
7575
err_messages.append(f"CPU usage {data.cpu_usage} exceeds limit {args.max_cpu_usage}")
7676
self._log_event(
7777
category=EventCategory.OS,

0 commit comments

Comments
 (0)