summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/download_headless.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/download_headless.py b/scripts/download_headless.py
index 116fe87c..d78f3a20 100755
--- a/scripts/download_headless.py
+++ b/scripts/download_headless.py
@@ -61,7 +61,8 @@ def download_headless(serial: str, output_path: str = None, dev: bool = False) -
r = requests.get(url, {'serial': serial, 'dev': str(dev).lower()})
results = json.loads(r.text)
if not results['ok']:
- raise DownloadException('Download failed.')
+ message = results['message'] if 'message' in results else ''
+ raise DownloadException('Download failed: {}'.format(message))
req_url = results['url']
content = requests.get(req_url, allow_redirects=True)