# HG changeset patch # User raph # Date 1282576775 -7200 # Node ID 3b92edaa52910e4977632cc37f9eecc81a5450f3 # Parent 0cf1d1fc084c3ee67bf0f710d31f6da153eecae3 do not try to us comment if detached diff -r 0cf1d1fc084c -r 3b92edaa5291 src/cm/utils/comment_positioning.py --- a/src/cm/utils/comment_positioning.py Thu Aug 19 13:19:24 2010 +0200 +++ b/src/cm/utils/comment_positioning.py Mon Aug 23 17:19:35 2010 +0200 @@ -182,9 +182,10 @@ start_color = wrapper_data['start_color'] offsets = sorted(wrapper_data['offsets'].items(), key=operator.itemgetter(0)) - # TODO: html.find(id = "sv-%d"%wrapper_id) is None (?) when comment detached - - content = html.find(id = "sv-%d"%wrapper_id).contents[0] + d = html.find(id = "sv-%d"%wrapper_id) + if not d: # comment detached + continue + content = d.contents[0] spans = ""