From 59848025d73ddf9989557bbb36974a567b5753d2 Mon Sep 17 00:00:00 2001 From: John Readey Date: Fri, 29 Mar 2024 05:40:54 -0700 Subject: [PATCH] report layout chunk prop, not cpl if both present (#180) * report layout chunk prop, not cpl if both present * fix flake8 errors --- h5pyd/_hl/objectid.py | 11 +++++++---- test/apps/config.py | 4 +++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/h5pyd/_hl/objectid.py b/h5pyd/_hl/objectid.py index 0a7baf1..120fe60 100644 --- a/h5pyd/_hl/objectid.py +++ b/h5pyd/_hl/objectid.py @@ -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 diff --git a/test/apps/config.py b/test/apps/config.py index 6be930a..65b04aa 100755 --- a/test/apps/config.py +++ b/test/apps/config.py @@ -22,7 +22,9 @@ def get_test_filenames(): "scale_offset.h5", "fletcher32.h5", "undecodable_attr.h5", - "diamond.h5" + "diamond.h5", + "small1dchunk.h5", + "small2dchunk.h5" )