From 52489fde29fc40ce27cb26825b67169dfe9e914e Mon Sep 17 00:00:00 2001
From: Alan De Smet <alan.desmet@ssec.wisc.edu>
Date: Mon, 16 Aug 2021 21:07:47 +0000
Subject: [PATCH] Correctly propogate cause of exception

---
 csppfetch/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/csppfetch/__init__.py b/csppfetch/__init__.py
index 8b96f4b..8f5c468 100644
--- a/csppfetch/__init__.py
+++ b/csppfetch/__init__.py
@@ -255,7 +255,7 @@ def download_already_present(state, dst, download_stats, i_own_file):
             logging.info("Assuming I'm not allowed to update the cache and that this is okay.")
     except Exception as e:
         msg = 'Unable to update timestamp on "{0}": {1}'.format(dst, e)
-        raise Exception(msg)
+        raise Exception(msg) from e
 
 HUGE_TIMEOUT=60*60*24*30 # 30 days in seconds
 def download_to_file_no_lock(url, dst, fileobj, timeout=HUGE_TIMEOUT):
-- 
GitLab