summaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/tiptorrent.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/utils/tiptorrent.py b/src/utils/tiptorrent.py
index 1d628c1..9ed6a65 100644
--- a/src/utils/tiptorrent.py
+++ b/src/utils/tiptorrent.py
@@ -51,8 +51,11 @@ def tip_write_csum(image_name):
filename = image_path + ".full.sum"
csum = _compute_md5(image_path)
- with open(filename, 'w') as f:
- f.write(csum)
+ try:
+ with open(filename, 'w') as f:
+ f.write(csum)
+ except OSError as e:
+ raise OgError(f'Could not write {filename}, reported: {e}') from e
return csum