This is an archive of the discontinued LLVM Phabricator instance.

[LNT] Python 3 support: requests.response as text
ClosedPublic

Authored by thopre on Oct 15 2019, 7:03 AM.

Details

Summary

lnt admin rm-machine command prints output from the REST API for
deleting machine line by line using requests.response's iter_lines()
method. However in Python 3 this method returns data by default and
printing expects a string. This commit uses the text attribute for
requests.response and iterate over the lines with splitlines.