python-helper: Catch exceptions in report_trace

EOF propagates upwards otherwise, causing the tested code to fail
mysteriously.