Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update get_csa_header to return none on CSAReadError #501

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update csareader.py to correct style errors
parneshraniga authored Jan 3, 2017
commit 4a73b36fe2358d003adcc8437fb5ea3a5bd2e45e
5 changes: 2 additions & 3 deletions nibabel/nicom/csareader.py
Original file line number Diff line number Diff line change
@@ -66,10 +66,9 @@ def get_csa_header(dcm_data, csa_type='image'):
try:
tag = dcm_data[(0x29, element_no)]
return read(tag.value)
except (KeyError,CSAReadError):
except (KeyError, CSAReadError):
# The element could be missing due to anonymization
return None

return None


def read(csa_str):