fix crash on empty element text
1 files changed, 3 insertions(+), 2 deletions(-) M bin/query-webpage
M bin/query-webpage => bin/query-webpage +3 -2
@@ 71,8 71,9 @@ def process_element(elem, extractmode, outputsep, extractarg=""): # we can't really do much of anything. show_warning("Ignored element '{}' because it had empty .text." .format(elem)) sys.stdout.write(elem.text) sys.stdout.write(outputsep) else: sys.stdout.write(elem.text) sys.stdout.write(outputsep) elif extractmode == "extract_attribute": for item in (i for i in elem.items() if i[0] == extractarg.replace('@', '')):