[weboob] Error messages and return codes

Laurent Bachelier laurent at bachelier.name
Wed May 4 00:55:51 CEST 2011

Dear developers,

I did some corrections on return codes and the display of error

The traditional UNIX way is to return a code>0 when there is an error,
and to display the error on stderr instead of stdout.

The goal it to be able to do stuff like this:

if [ pastoob get plop at mypastebin > data.txt ]; then
	myotherprogram data.txt

If there is an error running the weboob command, the following command
will not be executed, and the error will be displayed to the user and
not copied into data.txt.

So from now, please remember to return a number >0 on applications
commands (do_ functions) and to use print >>sys.stderr, "Error message"
for abnormal output.


More information about the weboob mailing list