Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Steve Damon committed Jun 29, 2017
1 parent 391edab commit 255d220
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions dax/XnatUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,10 +853,16 @@ def list_sessions(intf, projectid=None, subjectid=None):
sess['last_modified'] = sess.get(last_modified_str, None)
sess['last_updated'] = sess.get('%s/original' % sess_type, None)
sess['age'] = sess.get('%s/age' % sess_type, None)
sess['handedness'] = subj_id2lab[sess['subject_ID']][0]
sess['gender'] = subj_id2lab[sess['subject_ID']][1]
sess['yob'] = subj_id2lab[sess['subject_ID']][2]
sess['dob'] = subj_id2lab[sess['subject_ID']][3]
try:
sess['handedness'] = subj_id2lab[sess['subject_ID']][0]
sess['gender'] = subj_id2lab[sess['subject_ID']][1]
sess['yob'] = subj_id2lab[sess['subject_ID']][2]
sess['dob'] = subj_id2lab[sess['subject_ID']][3]
except KeyError as KE:
sess['handedness'] = 'UNK'
sess['gender'] = 'UNK'
sess['yob'] = 'UNK'
sess['dob'] = 'UNK'

# Add sessions of this type to full list
full_sess_list.extend(sess_list)
Expand Down

0 comments on commit 255d220

Please sign in to comment.