Skip to content

Commit

Permalink
audio: Check for source match
Browse files Browse the repository at this point in the history
Check for a matching source before trying to append its name.
  • Loading branch information
prgmitchell committed Dec 29, 2023
1 parent e9db188 commit dcc4888
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion checks/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def checkAudioBuffering(lines):
for line, index in maxBuffering:
if (len(lines) > index):
m = audiobuf_re.search(lines[index + 1].replace('\r', ''))
if m.group("source"):
if m and m.group("source"):
append += "<br><br>Source affected (potential cause):<strong>" + m.group("source") + "</strong>"
break
return [LEVEL_CRITICAL, "Max Audio Buffering",
Expand Down

0 comments on commit dcc4888

Please sign in to comment.