mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1168535 - print error response body in upload_symbols.py. r=gps
This commit is contained in:
parent
5aa3c9df74
commit
4f65f3f57f
@ -254,7 +254,7 @@ endif # MOZ_CRASHREPORTER
|
||||
uploadsymbols:
|
||||
ifdef MOZ_CRASHREPORTER
|
||||
ifdef SOCORRO_SYMBOL_UPLOAD_TOKEN_FILE
|
||||
$(PYTHON) $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.py '$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip'
|
||||
$(PYTHON) -u $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.py '$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip'
|
||||
else
|
||||
$(SHELL) $(topsrcdir)/toolkit/crashreporter/tools/upload_symbols.sh $(SYMBOL_INDEX_NAME) '$(DIST)/$(PKG_PATH)$(SYMBOL_FULL_ARCHIVE_BASENAME).zip'
|
||||
endif
|
||||
|
@ -62,15 +62,22 @@ def main():
|
||||
|
||||
if r.status_code >= 200 and r.status_code < 300:
|
||||
print('Uploaded successfully!')
|
||||
elif r.status_code < 400:
|
||||
print('Error: bad auth token? ({0})'.format(r.status_code),
|
||||
return 0
|
||||
|
||||
if r.status_code < 400:
|
||||
print('Error: bad auth token? ({0}: {1})'.format(r.status_code,
|
||||
r.reason),
|
||||
file=sys.stderr)
|
||||
return 1
|
||||
else:
|
||||
print('Error: got HTTP response {0}'.format(r.status_code),
|
||||
print('Error: got HTTP response {0}: {1}'.format(r.status_code,
|
||||
r.reason),
|
||||
file=sys.stderr)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
print('Response body:\n{sep}\n{body}\n{sep}\n'.format(
|
||||
sep='=' * 20,
|
||||
body=r.text
|
||||
))
|
||||
return 1
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
|
Loading…
Reference in New Issue
Block a user