Skip to content

Commit

Permalink
fix for handling problem where NO NXentry found
Browse files Browse the repository at this point in the history
  • Loading branch information
sanbrock committed Oct 17, 2024
1 parent f0ce8fa commit e267676
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pynxtools/nexus/nexus.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
import os
import sys
from functools import lru_cache

from typing import Optional, Union, List, Any
from typing import Any, List, Optional, Union

import click
import h5py
Expand All @@ -16,6 +15,7 @@
from pynxtools.definitions.dev_tools.utils.nxdl_utils import (
add_base_classes,
check_attr_name_nxdl,
decode_or_not,
get_best_child,
get_hdf_info_parent,
get_local_name_from_xml,
Expand All @@ -29,7 +29,6 @@
try_find_units,
walk_elist,
write_doc_string,
decode_or_not,
)


Expand Down Expand Up @@ -378,6 +377,8 @@ def get_inherited_hdf_nodes(
# let us start with the given definition file
if hdf_node is None:
raise ValueError("hdf_node must not be None")
if nx_name == "NO NXentry found":
return (None, [], [])
elist = [] # type: ignore[var-annotated]
add_base_classes(elist, nx_name, elem)
nxdl_elem_path = [elist[0]]
Expand Down

0 comments on commit e267676

Please sign in to comment.