Mercurial > hg > webaudioevaluationtool
changeset 2792:2adc6d20ac0b
Merge branch 'master' into Dev_main
author | Nicholas Jillings <n.g.r.jillings@se14.qmul.ac.uk> |
---|---|
date | Sun, 23 Apr 2017 10:17:43 +0100 |
parents | 02d22f2875ca (current diff) 24b139760292 (diff) |
children | 1076ac62823f |
files | |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/python/comment_parser.py Sat Apr 22 17:59:44 2017 +0100 +++ b/python/comment_parser.py Sun Apr 23 10:17:43 2017 +0100 @@ -57,7 +57,7 @@ # for page [page_name], print comments related to fragment [id] for audioelement in audioholder.findall("./audioelement"): - if audioelement is not None: # Check it exists + if audioelement is not None and audioelement.get('type') != "outside-reference": audio_id = str(audioelement.get('ref')) csv_name = folder_name +'/' + page_name+'/'+page_name+'-comments-'+audio_id+'.csv' @@ -73,7 +73,10 @@ delimiter=',', dialect="excel", quoting=csv.QUOTE_ALL) - commentstr = audioelement.find("./comment/response").text + try: + commentstr = audioelement.find("./comment/response").text + except AttributeError: + commentstr = "" valuestr = audioelement.find("./value").text if commentstr is None: