Commit 74ad0985 authored by André Anjos's avatar André Anjos 💬

Merge branch 'improve_cached_datasink_error' into 'master'

Improve CachedDataSink error messages

See merge request !66
parents 429fc132 d2a65631
Pipeline #36517 passed with stages
in 7 minutes and 15 seconds
......@@ -935,8 +935,15 @@ class CachedDataSink(DataSink):
try:
self.data_file = open(self.filename, "wb")
self.index_file = open(self.filename.replace(".data", ".index"), "wt")
except Exception:
except Exception as e:
logger.error("Failed to open data file {}: {}".format(self.filename, e))
return False
try:
index_filename = self.filename.replace(".data", ".index")
self.index_file = open(index_filename, "wt")
except Exception as e:
logger.error("Failed to open index file {}: {}".format(index_filename, e))
return False
# Write the dataformat
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment