Skip to content

Commit

Permalink
Hotfix (#40)
Browse files Browse the repository at this point in the history
* Fixed problem with optional keywords element in obs_reader_writer
  • Loading branch information
andamian authored Sep 25, 2017
1 parent 416afc5 commit 4af2e4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions caom2/caom2/obs_reader_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion caom2/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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]

0 comments on commit 4af2e4e

Please sign in to comment.