kopia lustrzana https://github.com/ihabunek/toot
Remove splitlines, not needed
Works just as well if provided as a single Text object.pull/308/head
rodzic
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)
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue