Skip to content

Commit

Permalink
report layout chunk prop, not cpl if both present (#180)
Browse files Browse the repository at this point in the history
* report layout chunk prop, not cpl if both present

* fix flake8 errors
  • Loading branch information
jreadey authored Mar 29, 2024
1 parent ce5ae91 commit 5984802
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 7 additions & 4 deletions h5pyd/_hl/objectid.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,14 @@ def rank(self):
@property
def layout(self):
layout = None
dcpl = self.dcpl_json
if dcpl and 'layout' in dcpl:
layout = dcpl['layout']
elif 'layout' in self.obj_json:

if 'layout' in self.obj_json:
layout = self.obj_json['layout']
else:
dcpl = self.dcpl_json
if dcpl and 'layout' in dcpl:
layout = dcpl['layout']

return layout

@property
Expand Down
4 changes: 3 additions & 1 deletion test/apps/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ def get_test_filenames():
"scale_offset.h5",
"fletcher32.h5",
"undecodable_attr.h5",
"diamond.h5"
"diamond.h5",
"small1dchunk.h5",
"small2dchunk.h5"
)


Expand Down

0 comments on commit 5984802

Please sign in to comment.