mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Replace sys.exit() in non-main functions by exceptions
Also move all exceptions into one module
This commit is contained in:
parent
a8420817cb
commit
1fcd8e63a3
17 changed files with 119 additions and 141 deletions
|
|
@ -25,7 +25,7 @@ import logging
|
|||
|
||||
from . import common
|
||||
from . import net
|
||||
from .common import FDroidException
|
||||
from .exception import FDroidException
|
||||
|
||||
options = None
|
||||
config = None
|
||||
|
|
@ -80,7 +80,7 @@ def main():
|
|||
try:
|
||||
net.download_file(url, dldir=tmp_dir)
|
||||
except requests.exceptions.HTTPError as e:
|
||||
raise FDroidException('downloading %s failed', url) from e
|
||||
raise FDroidException('Downloading %s failed. %s', (url, e))
|
||||
|
||||
compare_result = common.verify_apks(
|
||||
remoteapk,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue