Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
kmap
xsocs
Commits
719384e3
Commit
719384e3
authored
Sep 27, 2016
by
Damien Naudet
Browse files
Fixed a problem occuring when retrieving the entries in an Xsocs file.
parent
86fcac36
Changes
1
Hide whitespace changes
Inline
Side-by-side
kmap/io/XsocsH5.py
View file @
719384e3
...
...
@@ -159,9 +159,12 @@ class XsocsH5(XsocsH5Base):
def
_update_entries
(
self
):
with
self
.
_get_file
()
as
h5_file
:
self
.
__entries
=
sorted
([
key
for
key
in
h5_file
.
keys
()
if
(
h5_file
[
key
].
attrs
.
get
(
'NX_class'
)
==
'NXentry'
)])
# TODO : this isnt pretty but for some reason the attrs.get() fails
# when there is no attribute NX_class (should return the default
# None)
self
.
__entries
=
sorted
([
key
for
key
in
h5_file
if
(
'NX_class'
in
h5_file
[
key
].
attrs
and
h5_file
[
key
].
attrs
[
'NX_class'
]
==
'NXentry'
)])
# noqa
def
entries
(
self
):
if
self
.
__entries
is
None
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment