diff --git a/caom2/caom2/obs_reader_writer.py b/caom2/caom2/obs_reader_writer.py index 7341f393..fc09e920 100644 --- a/caom2/caom2/obs_reader_writer.py +++ b/caom2/caom2/obs_reader_writer.py @@ -261,8 +261,9 @@ def _add_keywords(self, keywords_list, element, ns, required): keywords_list.add(keyword) else: keywords_element = self._get_child_element("keywords", element, ns, required) - for keyword in keywords_element.iterchildren(tag=("{" + ns + "}keyword")): - keywords_list.add(keyword.text) + if keywords_element is not None: + for keyword in keywords_element.iterchildren(tag=("{" + ns + "}keyword")): + keywords_list.add(keyword.text) def _get_algorithm(self, element_tag, parent, ns, required): diff --git a/caom2/setup.cfg b/caom2/setup.cfg index 87a0efd5..34be1d5a 100644 --- a/caom2/setup.cfg +++ b/caom2/setup.cfg @@ -39,7 +39,7 @@ edit_on_github = False github_project = opencadc/caom2tools install_requires = future lxml aenum # version should be PEP386 compatible (http://www.python.org/dev/peps/pep-0386) -version = 2.3.0a3 +version = 2.3.0a4 [entry_points]