This is an automated email from the git hooks/post-receive script. yoh pushed a commit to tag 0.4 in repository python-mne.
commit 1171603b2291e5a418014ff3bea8530634ec29be Author: Alexandre Gramfort <[email protected]> Date: Fri Dec 9 12:00:27 2011 +0100 ENH : more informative error message in read vol iop --- mne/source_space.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mne/source_space.py b/mne/source_space.py index addfc5d..74b0e03 100644 --- a/mne/source_space.py +++ b/mne/source_space.py @@ -142,7 +142,11 @@ def _read_one_source_space(fid, this): if tag is not None: res['src_mri_t'] = tag.data - mri = dir_tree_find(this, FIFF.FIFFB_MNE_PARENT_MRI_FILE)[0] + parent_mri = dir_tree_find(this, FIFF.FIFFB_MNE_PARENT_MRI_FILE) + if len(parent_mri) == 0: + raise ValueError('Can not find parent MRI location') + + mri = parent_mri[0] for d in mri['directory']: if d.kind == FIFF.FIFF_COORD_TRANS: tag = read_tag(fid, d.pos) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-mne.git _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
