diff options
author | Roberto Hueso Gómez <rhueso@soleta.eu> | 2020-01-21 12:06:12 +0100 |
---|---|---|
committer | Alvaro Neira Ayuso <aneira@soleta.eu> | 2020-01-21 17:32:57 +0100 |
commit | ca0a62f9c69e13e0c74b099de85f52a9daf0df54 (patch) | |
tree | f07dbf484c090305dc5759863b249a9aa1c0a3c3 /src/ogRest.py | |
parent | d401c9ff468b3df106b2693611661c3870d5b89d (diff) |
Fix /software command Linux operation
This patch runs the script InventarioSoftware with the right arguments.
This also increases the recv buffer size for the test server.
Diffstat (limited to 'src/ogRest.py')
-rw-r--r-- | src/ogRest.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ogRest.py b/src/ogRest.py index f46a331..65a2731 100644 --- a/src/ogRest.py +++ b/src/ogRest.py @@ -114,9 +114,9 @@ class ogThread(): jsonResp.addElement('partition', request.getPartition()) f = open(path, "r") - lines = f.readlines() + output = f.read() f.close() - jsonResp.addElement('software', lines[0]) + jsonResp.addElement('software', output) response = restResponse(ogResponses.OK, jsonResp) client.send(response.get()) @@ -295,7 +295,7 @@ class ogRest(): threading.Thread(target=ogThread.session, args=(client, request, self,)).start() def process_software(self, client, request): - path = '/tmp/CSft-' + client.ip + '-' + request.getPartition() + path = '/tmp/CSft-' + client.ip + '-' + str(request.getPartition()) threading.Thread(target=ogThread.software, args=(client, request, path, self,)).start() def process_hardware(self, client): |