This commit is contained in:
Kovid Goyal 2016-05-02 14:27:34 +05:30
parent 9564a65000
commit 7501a3b0fd

View File

@ -46,7 +46,7 @@ def ajax(path, on_complete, on_progress=None, bypass_cache=True, method='GET', q
xhr.error_html = str.format(_('Failed to communicate with "{}", aborted'), xhr.request_path) xhr.error_html = str.format(_('Failed to communicate with "{}", aborted'), xhr.request_path)
else: else:
rtext = xhr.responseText or '' rtext = xhr.responseText or ''
xhr.error_html = str.format(_('Failed to communicate with "{}", with status: [{}] {}<br>{}'), xhr.request_path, xhr.status, xhr.statusText, rtext[:200]) xhr.error_html = str.format(_('Failed to communicate with "{}", with status: [{}] {}<br><br>{}'), xhr.request_path, xhr.status, xhr.statusText, rtext[:200])
def progress_callback(ev): def progress_callback(ev):
if ev.lengthComputable: if ev.lengthComputable: