X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=scripts%2Fdl_github_archive.py;h=4bb7d131bb8303e397649fddbf63e1df96b20b18;hp=5a5a016e37e27f420e24fe54ff306902f2ccf8a9;hb=077253dd666a30ae5231c3748222d4b5b138593d;hpb=04b9f8587370f96366c6e53fb411473279ba7c02 diff --git a/scripts/dl_github_archive.py b/scripts/dl_github_archive.py index 5a5a016e37..4bb7d131bb 100755 --- a/scripts/dl_github_archive.py +++ b/scripts/dl_github_archive.py @@ -415,12 +415,13 @@ def main(): parser.add_argument('--source', help='Source tarball filename') parser.add_argument('--hash', help='Source tarball\'s expected sha256sum') args = parser.parse_args() - method = DownloadGitHubTarball(args) try: + method = DownloadGitHubTarball(args) method.download() - except Exception: - sys.stderr.write('download {} from {} failed\n'.format(args.source, args.url)) - raise + except Exception as ex: + sys.stderr.write('{}: Download from {} failed\n'.format(args.source, args.url)) + sys.stderr.write('{}\n'.format(ex)) + sys.exit(1) if __name__ == '__main__': main()