Commit d2a65631 authored by Samuel GAIST's avatar Samuel GAIST

[data] Improve CachedDataSink error messages

If the opening of the cache file fails, print an error
message to know where to look at.
parent 1411b833
Pipeline #36515 passed with stage
in 2 minutes and 50 seconds
......@@ -935,8 +935,15 @@ class CachedDataSink(DataSink):
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
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
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment