From d81c767345c37f07666397f8cb814e9efa3c057f Mon Sep 17 00:00:00 2001 From: wklken Date: Thu, 5 Aug 2021 14:22:21 +0800 Subject: [PATCH] bugfix: raise exception after replace esb api prefix --- iam/__version__.py | 2 +- iam/api/client.py | 2 +- release.md | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/iam/__version__.py b/iam/__version__.py index 36b43f7..aeaef40 100644 --- a/iam/__version__.py +++ b/iam/__version__.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -__version__ = "1.1.17" +__version__ = "1.1.18" diff --git a/iam/api/client.py b/iam/api/client.py index d73001e..76f4597 100644 --- a/iam/api/client.py +++ b/iam/api/client.py @@ -129,7 +129,7 @@ def _call_esb_api(self, http_func, path, data, bk_token, bk_username, timeout=No """ if self._apigateway_on: apigw_path = path.replace("/api/c/compapi/v2/iam/", "/api/v1/open/") - if not path.startswith("/api/v1/open/"): + if not apigw_path.startswith("/api/v1/open/"): raise AuthAPIError("can't find the matched apigateway path, the esb api path is %s" % path) return self._call_apigateway_api(http_func, apigw_path, data, timeout) diff --git a/release.md b/release.md index c503126..206068b 100644 --- a/release.md +++ b/release.md @@ -1,5 +1,9 @@ 版本日志 =============== +# v1.1.18 + +- bugfix: raise exception after replace esb api prefix + # v1.1.17 - contrib/iam_migration support calling api via APIGateway