Skip to content
This repository was archived by the owner on Jan 10, 2019. It is now read-only.
This repository was archived by the owner on Jan 10, 2019. It is now read-only.

sar/parser.py issues #5

@PeteHeybrock

Description

@PeteHeybrock

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:

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)

searchunks = []

but then referenced outside of that block
if searchunks:

I believe that searchunks should be defined around the same place as fhandle
fhandle = None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions