Skip to content

Commit

Permalink
fix some minor quirks with pycodestyle complaining about whitespaces...
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronkaplan committed Jan 15, 2024
1 parent 60f2c35 commit 8459d9c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

test: *.py parsers/* analyzers/*
python -m pytest --verbose tests
# or: nosetests -v


lint: *.py parsers/* analyzers/*
pycodestyle --exclude=venv --ignore=errors=E221,E225,E251,E501,E266,E302 --max-line-length=128 $(git ls-files '*.py')
6 changes: 3 additions & 3 deletions parsers/sysdiagnose-shutdownlogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

# --------------------------------------------#

CLIENTS_ARE_STILL_HERE_LINE = "these clients are still here"
CLIENTS_ARE_STILL_HERE_LINE = "these clients are still here"
REMAINING_CLIENT_PID_LINE = "remaining client pid"
SIGTERM_LINE = "SIGTERM"

Expand All @@ -47,13 +47,13 @@ def parse_shutdownlog(filepath, ios_version=16):
# look for begining of shutdown sequence
if CLIENTS_ARE_STILL_HERE_LINE in log_lines[index]:
running_processes = []
while not(SIGTERM_LINE in log_lines[index]):
while not (SIGTERM_LINE in log_lines[index]):
if (REMAINING_CLIENT_PID_LINE in log_lines[index]):
result = re.search(r".*: (\b\d+) \((.*)\).*", log_lines[index])
pid = result.groups()[0]
binary_path = result.groups()[1]
process = pid + ":" + binary_path
if not(process in running_processes):
if not (process in running_processes):
running_processes.append(process)
index += 1
# compute timestamp from SIGTERM line
Expand Down

0 comments on commit 8459d9c

Please sign in to comment.