Skip to content

Commit

Permalink
[proc-exit-listener]: ignore blank lines
Browse files Browse the repository at this point in the history
make proc-exit-listener more rebust

Signed-off-by: Guohan Lu <[email protected]>
  • Loading branch information
lguohan committed Jan 28, 2021
1 parent aab37b7 commit 34cca20
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions files/scripts/supervisor-proc-exit-listener
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import getopt
import os
import re
import select
import signal
import sys
Expand Down Expand Up @@ -40,6 +41,9 @@ def get_critical_group_and_process_list():

with open(CRITICAL_PROCESSES_FILE, 'r') as file:
for line in file:
# ignore blank lines
if re.match(r"^\s*$", line)
continue
line_info = line.strip(' \n').split(':')
if len(line_info) != 2:
syslog.syslog(syslog.LOG_ERR,
Expand Down

0 comments on commit 34cca20

Please sign in to comment.