From d15ca90eedb656258f6b1cad69464123e66b5d3b Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sat, 12 May 2018 02:59:09 +0200 Subject: [PATCH] [mod] add more debug output --- src/yunohost/service.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/yunohost/service.py b/src/yunohost/service.py index 0f5c1beb4..ee9ff33f1 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -679,11 +679,14 @@ def _get_files_diff(orig_file, new_file, as_string=False, skip_header=True): def _calculate_hash(path): """Calculate the MD5 hash of a file""" hasher = hashlib.md5() + try: with open(path, 'rb') as f: hasher.update(f.read()) return hasher.hexdigest() - except IOError: + + except IOError as e: + logger.warning("Error while calculating file '%s' hash: %s", path, e, exc_info=1) return None