mirror of
https://github.com/ihabunek/toot
synced 2024-12-25 00:20:55 +01:00
Remove splitlines, not needed
Works just as well if provided as a single Text object.
This commit is contained in:
parent
1b2da81d15
commit
cc1809db31
@ -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)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user