View Single Post
Old 12-01-2018, 11:33 AM   #43
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,605
Karma: 23165369
Join Date: Dec 2010
Device: Kindle PW2
Quote:
Originally Posted by thiago.eec View Post
Am I just missing some other reference or it would need a more profound change to the code?
For someone who claims to be a noob, you've made all the right changes.
However, you (and I) underestimated the EPUBCheck developers. Since they don't consider USAGE messages errors, all USAGE messages are written to stdout not stderr.

Since the plugin only checked stderr for error messages, they were ignored.

Your changes should work if you also add the following line:

Code:
                stderr = result[1].decode(os_encoding)
                stderr += stdout
Make sure not to use tabs for the indentation; it'd best if you copied the line before it and edited it.

(I've also attached an updated version of main.py for your convenience.)

Quote:
Originally Posted by thiago.eec View Post
EDIT: Of course this wouldn't be default behavior. It could be enabled by another entry to EpubCheck.json. Somethin like "usage": true.
I might add an "usage": true option in the next version.
Attached Files
File Type: py main.py (15.1 KB, 358 views)
Doitsu is offline   Reply With Quote