summaryrefslogtreecommitdiff
path: root/bin/update
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-11-16 23:18:43 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-11-16 23:19:34 +0100
commitf94d98db1be8c27e470b39d4b16ed406db3aef87 (patch)
treed3bb6109478b28fffa78398fd0103514b675467e /bin/update
parent05fc30e38899348fb58548adb7a72e4fa2874d62 (diff)
updater: improve message for failed update generation
Change-Id: Iadfcdd58ca77d0906583c63ff81170f54c8c0ecd
Diffstat (limited to 'bin/update')
-rwxr-xr-xbin/update/create_partial_update.py4
1 files changed, 2 insertions, 2 deletions
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')