Skip to content

Commit

Permalink
Merge pull request #2518 from ckan/2518-datapusher-tracebacks
Browse files Browse the repository at this point in the history
render datapusher tracebacks in resource_data.html
  • Loading branch information
joetsoi committed Sep 9, 2015
2 parents 6a1826f + 0857bbd commit 1ee1177
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ckan/templates/package/resource_data.html
Expand Up @@ -23,7 +23,7 @@
{% if status.task_info.error is string %}
{# DataPusher < 0.0.3 #}
<strong>{{ _('Error:') }}</strong> {{ status.task_info.error }}
{% elif status.task_info.error is iterable %}
{% elif status.task_info.error is mapping %}
<strong>{{ _('Error:') }}</strong> {{ status.task_info.error.message }}
{% for error_key, error_value in status.task_info.error.iteritems() %}
{% if error_key != "message" and error_value %}
Expand All @@ -32,6 +32,9 @@
{{ error_value }}
{% endif %}
{% endfor %}
{% elif status.task_info.error is iterable %}
<strong>{{ _('Error traceback:') }}</strong>
<pre>{{ ''.join(status.task_info.error) }}</pre>
{% endif %}
</div>
{% endif %}
Expand Down

0 comments on commit 1ee1177

Please sign in to comment.