diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/views.py')
| -rwxr-xr-x | bitbake/lib/toaster/toastergui/views.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bitbake/lib/toaster/toastergui/views.py b/bitbake/lib/toaster/toastergui/views.py index 280159ad2c..c25c512a84 100755 --- a/bitbake/lib/toaster/toastergui/views.py +++ b/bitbake/lib/toaster/toastergui/views.py | |||
| @@ -112,6 +112,9 @@ def objtojson(obj): | |||
| 112 | elif isinstance(d[di], int) and hasattr(obj, "get_%s_display" % di): | 112 | elif isinstance(d[di], int) and hasattr(obj, "get_%s_display" % di): |
| 113 | nd[di] = getattr(obj, "get_%s_display" % di)() | 113 | nd[di] = getattr(obj, "get_%s_display" % di)() |
| 114 | return nd | 114 | return nd |
| 115 | elif isinstance( obj, type(lambda x:x)): | ||
| 116 | import inspect | ||
| 117 | return inspect.getsourcelines(obj)[0] | ||
| 115 | else: | 118 | else: |
| 116 | raise TypeError("Unserializable object %s (%s) of type %s" % ( obj, dir(obj), type(obj))) | 119 | raise TypeError("Unserializable object %s (%s) of type %s" % ( obj, dir(obj), type(obj))) |
| 117 | 120 | ||
