mirror of
https://github.com/triqs/dft_tools
synced 2024-12-25 13:53:40 +01:00
Fix missing cached key in archives
When an object with __hdf_write__ was written in an archive, the corresponding key was not cached. Therefore, one could not access the object which had just been written.
This commit is contained in:
parent
8cc5012347
commit
15f0899016
@ -184,6 +184,7 @@ class HDFArchiveGroup (HDFArchiveGroupBasicLayer) :
|
||||
|
||||
if '__write_hdf5__' in dir(val) : # simplest protocol
|
||||
val.__write_hdf5__(self._group,key)
|
||||
self.cached_keys.append(key) # I need to do this here
|
||||
SUB = HDFArchiveGroup(self,key)
|
||||
write_attributes(SUB)
|
||||
elif '__reduce_to_dict__' in dir(val) : # Is it a HDF_compliant object
|
||||
|
Loading…
Reference in New Issue
Block a user