Commit fb7e4a29 authored by Will Thompson's avatar Will Thompson Committed by John (J5) Palmieri

Use pprint to slightly prettify method output

parent 523baca1
......@@ -4,6 +4,8 @@ from dfeet import _util
from uiloader import UILoader
from pprint import pformat
def unwrap(x):
"""Hack to unwrap D-Bus values, so that they're easier to read when
printed."""
......@@ -71,7 +73,9 @@ class ExecuteMethodDialog:
if result is None:
result = 'This method did not return anything'
self.prettyprint_textview.get_buffer().set_text(str(unwrap(result)))
prettified = pformat(unwrap(result))
self.prettyprint_textview.get_buffer().set_text(prettified)
self.source_textview.get_buffer().set_text(str(result))
def run(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment