Skip to content
Snippets Groups Projects
Commit 1425a0f0 authored by Laura Abbott's avatar Laura Abbott
Browse files

linux-ramdump-parser-v2: use sys.stdout as the default file

Some parsers may need to use the out file for their output. Currently,
when writing to stdout, we have 'None' as a parser which blows up
with dmesg parsing:

Traceback (most recent call last):
File "ramparse.py", line 318, in <module>
    p.cls(dump).parse()
File "dmesg.py", line 20, in parse
    dmesglib.DmesgLib(self.ramdump, print_out.out_file).extract_dmesg()
File "dmesglib.py", line 79, in extract_dmesg
    self.extract_dmesg_binary()
File "dmesglib.py", line 72, in extract_dmesg_binary
    self.outfile.write(f)
AttributeError: 'NoneType' object has no attribute 'write'

Make a default file of sys.stdout to do something reasonable when writing
to stdout. --stdout is mostly a debugging feature.

Change-Id: I8af80e1e6d79c4ef6660a536df02d26c28089760
parent 2a90bad4
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment