str() exceptions before feeding them to do_output

Signed-off-by: Raul Gutierrez S <rgs@itevenworks.net>