diff --git a/alcli/__init__.py b/alcli/__init__.py index 3b5d91f..b7c97e3 100644 --- a/alcli/__init__.py +++ b/alcli/__init__.py @@ -1,2 +1,2 @@ -__version__ = '1.0.12' +__version__ = '1.0.13' __author__ = 'Alert Logic, Inc.' diff --git a/alcli/alertlogic_cli.py b/alcli/alertlogic_cli.py index 8c61c12..dbb6204 100644 --- a/alcli/alertlogic_cli.py +++ b/alcli/alertlogic_cli.py @@ -55,7 +55,7 @@ def cli_pager(text): def get_cli_pager(): if sys.platform == 'win32': - return lambda text: pydoc.pipepager(text, 'more -C') + return lambda text: pydoc.pipepager(text, 'more /C') if hasattr(os, 'system') and os.system('(less) 2>/dev/null') == 0: return lambda text: pydoc.pipepager(text, 'less -R') @@ -172,7 +172,10 @@ def __call__(self, args, parsed_globals): # Remove optional arguments that haven't been supplied op_args = {k:self._encode(operation, k, v) for (k,v) in kwargs.items() if v is not None} res = operation(**op_args) - self._print_result(res.json(), parsed_globals.query) + try: + self._print_result(res.json(), parsed_globals.query) + except JSONDecodeError: + print(f"status code: {res.status_code}") @property def client(self): diff --git a/requirements.txt b/requirements.txt index 0e5ad29..b92b75b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ -alertlogic-sdk-python>=1.0.14 +alertlogic-sdk-python>=1.0.15 jmespath>=0.9.4 certifi==2019.11.28 chardet==3.0.4 diff --git a/setup.py b/setup.py index 4588c7f..c6021c0 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ history = history_file.read() requirements = [ - 'alertlogic-sdk-python>=1.0.14', + 'alertlogic-sdk-python>=1.0.15', 'configparser>=4.0.2', 'pyyaml==5.1.2', 'jmespath>=0.9.4'