Re: [PATCH 25/25] qapi: Improve source file read error handling

2019-09-24 Thread Markus Armbruster
Eric Blake writes: > On 9/24/19 8:28 AM, Markus Armbruster wrote: >> qap-gen.py crashes when it can't open the main schema file, and when > > qapi-gen.py Will fix. >> it can't read from any schema file. Lazy. >> >> Change QAPISchema.__init__() to take a file name instead of a file >> object.

Re: [PATCH 25/25] qapi: Improve source file read error handling

2019-09-24 Thread Eric Blake
On 9/24/19 8:28 AM, Markus Armbruster wrote: > qap-gen.py crashes when it can't open the main schema file, and when qapi-gen.py > it can't read from any schema file. Lazy. > > Change QAPISchema.__init__() to take a file name instead of a file > object. Move the open code from _include() to __i

[PATCH 25/25] qapi: Improve source file read error handling

2019-09-24 Thread Markus Armbruster
qap-gen.py crashes when it can't open the main schema file, and when it can't read from any schema file. Lazy. Change QAPISchema.__init__() to take a file name instead of a file object. Move the open code from _include() to __init__(), so it's used for the main schema file, too. Move the read i