Mercurial > code > home > repos > homeauto
diff lib/patchablegraph/patchablegraph.py @ 706:b41247c7b080
fix text/plain output
Ignore-this: 484512f1c81139ef4788680e2ccef973
author | drewp@bigasterisk.com |
---|---|
date | Mon, 03 Feb 2020 01:10:35 -0800 |
parents | 74ad667f8c5b |
children | 5b6022beb388 |
line wrap: on
line diff
--- a/lib/patchablegraph/patchablegraph.py Mon Feb 03 00:51:26 2020 -0800 +++ b/lib/patchablegraph/patchablegraph.py Mon Feb 03 01:10:35 2020 -0800 @@ -47,9 +47,9 @@ if acceptHeader.startswith('text/html'): # browser; should arrange to pick live view req.set_header('Content-type', 'text/plain') - lines = graph.serialize(format='nquads') + lines = graph.serialize(None, format='nquads').splitlines() lines.sort() - req.write(''.join(lines)) + req.write(b'\n'.join(lines)) return req.set_header('Content-type', 'application/x-trig')