Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bareos/python-bareos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Steffens <joerg.steffens@bareos.com>2015-11-15 13:14:24 +0300
committerJoerg Steffens <joerg.steffens@bareos.com>2015-11-15 13:14:24 +0300
commitf59d9d8e10896627615770d9f88c5f32215bfb8b (patch)
tree643d0743940a92309aae8d2e143532f55866d9b7
parent8ca039b81db96a31619c7cc3c3a60082111ad344 (diff)
use compact format of json api mode
-rwxr-xr-xbareos/bsock/bsockjson.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/bareos/bsock/bsockjson.py b/bareos/bsock/bsockjson.py
index fc6786a..9fd67c0 100755
--- a/bareos/bsock/bsockjson.py
+++ b/bareos/bsock/bsockjson.py
@@ -20,7 +20,11 @@ class BSockJson(BSock):
super(BSockJson, self).__init__(
address, port, dirname, name,
password)
- self.call(".api 2")
+ # older version did not support compact mode,
+ # therfore first set api mode to json (which should always work in bareos >= 15.2.0)
+ # and then set api mode json compact (which should work with bareos >= 15.2.2)
+ self.call(".api json")
+ self.call(".api json compact=yes")
def call(self, command):