diff options
| author | Eric Huss <eric@huss.org> | 2020-08-23 11:29:27 -0700 |
|---|---|---|
| committer | Eric Huss <eric@huss.org> | 2020-08-23 11:29:27 -0700 |
| commit | 2e6f2e885506ee46ea32622e33fe74d99774cf57 (patch) | |
| tree | f688f971f82c1136814fb7dee2a1ceb31e3b57db /src/tools/publish_toolstate.py | |
| parent | 9d606d939a61c2f4c7bb4d89d959b60a53f50241 (diff) | |
| download | rust-2e6f2e885506ee46ea32622e33fe74d99774cf57.tar.gz rust-2e6f2e885506ee46ea32622e33fe74d99774cf57.zip | |
publish-toolstate: show more context on HTTP error
Diffstat (limited to 'src/tools/publish_toolstate.py')
| -rwxr-xr-x | src/tools/publish_toolstate.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/tools/publish_toolstate.py b/src/tools/publish_toolstate.py index 72b3df8377a..51416c8ce63 100755 --- a/src/tools/publish_toolstate.py +++ b/src/tools/publish_toolstate.py @@ -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 |
