publish-toolstate: show more context on HTTP error
This commit is contained in:
parent
9d606d939a
commit
2e6f2e8855
@ -275,7 +275,7 @@ def update_latest(
|
||||
return message
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
def main():
|
||||
repo = os.environ.get('TOOLSTATE_VALIDATE_MAINTAINERS_REPO')
|
||||
if repo:
|
||||
github_token = os.environ.get('TOOLSTATE_REPO_ACCESS_TOKEN')
|
||||
@ -342,3 +342,11 @@ if __name__ == '__main__':
|
||||
}
|
||||
))
|
||||
response.read()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
try:
|
||||
main()
|
||||
except urllib2.HTTPError as e:
|
||||
print("HTTPError: %s\n%s" % (e, e.read()))
|
||||
raise
|
||||
|
Loading…
Reference in New Issue
Block a user