mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2025-05-21 23:42:45 +00:00
Moved JsonDebugPrinter to existing utils module
This commit is contained in:
parent
7491000a13
commit
de493d13dd
6 changed files with 25 additions and 24 deletions
|
@ -494,3 +494,16 @@ def has_attribute(obj, name):
|
|||
return True
|
||||
except AttributeError:
|
||||
return False
|
||||
|
||||
|
||||
class JsonDebugPrinter(object):
|
||||
|
||||
''' Helper class to defer converting data to JSON until it is needed.
|
||||
See: https://github.com/jellyfin/jellyfin-kodi/pull/193
|
||||
'''
|
||||
|
||||
def __init__(self, data):
|
||||
self.data = data
|
||||
|
||||
def __str__(self):
|
||||
return json.dumps(self.data, indent=4)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue