1
0
mirror of https://github.com/ihabunek/toot synced 2024-12-24 08:00:39 +01:00

Remove splitlines, not needed

Works just as well if provided as a single Text object.
This commit is contained in:
Ivan Habunek 2023-02-02 09:31:37 +01:00
parent 1b2da81d15
commit cc1809db31

View File

@ -13,9 +13,8 @@ class StatusSource(urwid.Padding):
"""Shows status data, as returned by the server, as formatted JSON.""" """Shows status data, as returned by the server, as formatted JSON."""
def __init__(self, status): def __init__(self, status):
self.source = json.dumps(status.data, indent=4) self.source = json.dumps(status.data, indent=4)
lines = self.source.splitlines()
walker = urwid.SimpleFocusListWalker([ walker = urwid.SimpleFocusListWalker([
urwid.Text(line) for line in lines urwid.Text(self.source)
]) ])
list = urwid.ListBox(walker) list = urwid.ListBox(walker)