osc-lib/osc_lib/api
Andrey Kurilin 2d4f3da090 Fix usage of NotFound exception
All built-in inheritors of osc_lib.exceptions.ClientException expects
3 positional arguments: first argument is code, the second one is
message.

osc_lib.api.api.BaseAPI raises NotFound exception with transmitting only
message arguments which goes to position of 'code' argument.

This patch adds `code=404` argument and passes actual message as
'message'.

Also, this patch adds a hack that processes code as message
 n case when code is not an integer and None was found at 'message'
argument.

Funny fact:
More than 4 years ago, I proposed a similar fix to oslo-incubator... it
was so long ago...
https://review.opendev.org/#/c/94884 :)

Change-Id: I022bbf3ce4bdd48b3bdcb008ee872c4f62a7b12b
2019-08-08 14:42:23 +00:00
..
__init__.py Move api.api and api.utils to osc_lib 2016-05-20 15:56:09 -05:00
api.py Fix usage of NotFound exception 2019-08-08 14:42:23 +00:00
auth.py Corrent using auth_type=none in clouds.yaml 2019-06-12 11:17:34 +02:00
utils.py Move api.api and api.utils to osc_lib 2016-05-20 15:56:09 -05:00