diff options
author | Jose M. Guisado <jguisado@soleta.eu> | 2021-03-18 14:19:51 +0100 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2021-03-18 15:40:35 +0100 |
commit | 565e798ef9622486e9a11382085caf1e9c465241 (patch) | |
tree | 0e03fa4f0323cc4921c057a4ca947b7d6e997ebe /cli/objects/modes.py | |
parent | c80f27c98ca1748ca08cb00bd57eb4c3baba79a5 (diff) |
Print json instead of python dict in responses
r.json() decodes the responses json and passes it to json.loads() which
will convert the content into a python dictionary.
Print the literal JSON text so that output can be further manipulated by
other tools like jq.
Diffstat (limited to 'cli/objects/modes.py')
-rw-r--r-- | cli/objects/modes.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/objects/modes.py b/cli/objects/modes.py index c228eb0..e172570 100644 --- a/cli/objects/modes.py +++ b/cli/objects/modes.py @@ -13,7 +13,7 @@ class OgModes(): @staticmethod def list_available_modes(rest): r = rest.get('/mode') - print(r.json()) + print(r.text) @staticmethod def set_modes(rest, args): |