Remove splitlines, not needed

Works just as well if provided as a single Text object.
pull/308/head
Ivan Habunek 2023-02-02 09:31:37 +01:00
rodzic 1b2da81d15
commit cc1809db31
1 zmienionych plików z 1 dodań i 2 usunięć

Wyświetl plik

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