diff options
author | Joerg Steffens <joerg.steffens@bareos.com> | 2015-11-15 13:14:24 +0300 |
---|---|---|
committer | Joerg Steffens <joerg.steffens@bareos.com> | 2015-11-15 13:14:24 +0300 |
commit | f59d9d8e10896627615770d9f88c5f32215bfb8b (patch) | |
tree | 643d0743940a92309aae8d2e143532f55866d9b7 | |
parent | 8ca039b81db96a31619c7cc3c3a60082111ad344 (diff) |
use compact format of json api mode
-rwxr-xr-x | bareos/bsock/bsockjson.py | 6 |
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): |