aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/dl_github_archive.py
diff options
context:
space:
mode:
authorYousong Zhou <yszhou4tech@gmail.com>2018-07-17 17:05:53 +0000
committerYousong Zhou <yszhou4tech@gmail.com>2018-07-17 17:27:01 +0000
commitac10975cd704af465f8200f504032bc0d7b0d1ba (patch)
treef51f67bcb517a48bfaaab6ea2e4f0d81f3477960 /scripts/dl_github_archive.py
parent28d3a1b54b6726a0a93477d75d09a25f74ee361f (diff)
downloadupstream-ac10975cd704af465f8200f504032bc0d7b0d1ba.tar.gz
upstream-ac10975cd704af465f8200f504032bc0d7b0d1ba.tar.bz2
upstream-ac10975cd704af465f8200f504032bc0d7b0d1ba.zip
scripts/dl_github_archive.py: stringify exception
Closes openwrt/openwrt#1163 Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
Diffstat (limited to 'scripts/dl_github_archive.py')
-rwxr-xr-xscripts/dl_github_archive.py9
1 files changed, 5 insertions, 4 deletions
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()