From f94d98db1be8c27e470b39d4b16ed406db3aef87 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Thu, 16 Nov 2017 23:18:43 +0100 Subject: updater: improve message for failed update generation Change-Id: Iadfcdd58ca77d0906583c63ff81170f54c8c0ecd --- bin/update/create_partial_update.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'bin/update') diff --git a/bin/update/create_partial_update.py b/bin/update/create_partial_update.py index 694fbb204eaa..28e6cf510c42 100755 --- a/bin/update/create_partial_update.py +++ b/bin/update/create_partial_update.py @@ -18,7 +18,7 @@ from path import UpdaterPath, mkdir_p, convert_to_unix, convert_to_native BUF_SIZE = 1024 current_dir_path = os.path.dirname(os.path.realpath(convert_to_unix(__file__))) -def InvalidFileException(Exception): +class InvalidFileException(Exception): def __init__(self, *args, **kwargs): super().__init__(self, *args, **kwargs) @@ -36,7 +36,7 @@ def download_file(filepath, url, hash_string): file_hash = get_hash(filepath) if file_hash != hash_string: - raise InvalidFileException() + raise InvalidFileException("file hash does not match for file %s: Expected %s, Got: %s" % (url, hash_string, file_hash)) def handle_language(lang_entries, filedir): mar = os.environ.get('MAR', 'mar') -- cgit