f = None
try:
if group is None:
- self._check_file()
- f = _h5py.File(self._filename, 'r')
- group = f[self.group]
+ if isinstance(self.group, _h5py.Group):
+ group = self.group
+ else:
+ self._check_file()
+ f = _h5py.File(self._filename, 'r')
+ group = f[self.group]
for s in config.settings:
if s.name not in group.keys():
continue
f = None
try:
if group is None:
- self._check_file()
- f = _h5py.File(self._filename, 'a')
- group = f[self.group]
+ if isinstance(self.group, _h5py.Group):
+ group = self.group
+ else:
+ self._check_file()
+ f = _h5py.File(self._filename, 'a')
+ group = f[self.group]
for s in config.settings:
value = None
if isinstance(s, (_config.BooleanSetting,