summaryrefslogtreecommitdiffstats
path: root/cli/objects/client.py
diff options
context:
space:
mode:
authorJose M. Guisado <jguisado@soleta.eu>2021-03-18 14:19:51 +0100
committerOpenGnSys Support Team <soporte-og@soleta.eu>2021-03-18 15:40:35 +0100
commit565e798ef9622486e9a11382085caf1e9c465241 (patch)
tree0e03fa4f0323cc4921c057a4ca947b7d6e997ebe /cli/objects/client.py
parentc80f27c98ca1748ca08cb00bd57eb4c3baba79a5 (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/client.py')
-rw-r--r--cli/objects/client.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/objects/client.py b/cli/objects/client.py
index d060af1..bee1ba4 100644
--- a/cli/objects/client.py
+++ b/cli/objects/client.py
@@ -13,7 +13,7 @@ class OgClient():
@staticmethod
def list_clients(rest):
r = rest.get('/clients')
- print(r.json())
+ print(r.text)
@staticmethod
def list_client_hardware(rest, args):
@@ -27,7 +27,7 @@ class OgClient():
payload = {'client': parsed_args.client_ip}
r = rest.get('/hardware', payload=payload)
- print(r.json())
+ print(r.text)
@staticmethod
def get_client_properties(rest, args):
@@ -40,4 +40,4 @@ class OgClient():
payload = {'client': parsed_args.client_ip}
r = rest.get('/client/info', payload=payload)
- print(r.json())
+ print(r.text)