mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
throw proper error when download of apks fail
This commit is contained in:
parent
c7ae6bc826
commit
abe04272b1
3 changed files with 12 additions and 3 deletions
|
|
@ -19,6 +19,7 @@
|
|||
import sys
|
||||
import os
|
||||
import glob
|
||||
import requests
|
||||
from argparse import ArgumentParser
|
||||
import logging
|
||||
|
||||
|
|
@ -76,7 +77,10 @@ def main():
|
|||
os.remove(remoteapk)
|
||||
url = 'https://f-droid.org/repo/' + apkfilename
|
||||
logging.info("...retrieving " + url)
|
||||
net.download_file(url, dldir=tmp_dir)
|
||||
try:
|
||||
net.download_file(url, dldir=tmp_dir)
|
||||
except requests.exceptions.HTTPError as e:
|
||||
raise FDroidException('downloading %s failed', url) from e
|
||||
|
||||
compare_result = common.verify_apks(
|
||||
remoteapk,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue