This repository was archived by the owner on Jan 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
This repository was archived by the owner on Jan 10, 2019. It is now read-only.
sar/parser.py issues #5
Copy link
Copy link
Open
Description
Thanks for writing this tool, I've been using it for months now and it's been very useful. I'm currently re-writing my code to parse my sar files in parallel (using the multiprocessing module) and came across a couple of minor issues in the _split_file function in sar/parser.py:
The first issue is in line 123:
Line 123 in e1dd7aa
| if fhandle or data != '': |
I believe that the test should be if fhandle is not None since it's valid for fhandle == 0 (which is what I get when I run the code in a child process
The next issue is in line 165:
searchunks is currently defined inside an if block (which might not get executed)
Line 165 in e1dd7aa
| searchunks = [] |
but then referenced outside of that block
Line 209 in e1dd7aa
| if searchunks: |
I believe that searchunks should be defined around the same place as fhandle
Line 114 in e1dd7aa
| fhandle = None |
Metadata
Metadata
Assignees
Labels
No labels