# HG changeset patch # User Nicholas Jillings # Date 1492939053 -3600 # Node ID c0cb7c416d8e566e5b893fd511aa913c1c010767 # Parent 48e1c0ef003f46524f422552b30e6e76a8efa670# Parent 24b139760292520973381312335f481f53f3fad0 Merge branch 'master' into vnext diff -r 48e1c0ef003f -r c0cb7c416d8e python/comment_parser.py --- a/python/comment_parser.py Fri Apr 21 16:27:47 2017 +0100 +++ b/python/comment_parser.py Sun Apr 23 10:17:33 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: