Import ApiException from single source (#384)

Import ApiException from single source

SUMMARY
Signed-off-by: Abhijeet Kasurde akasurde@redhat.com
ISSUE TYPE

Bugfix Pull Request

COMPONENT NAME
changelogs/fragments/exception.yml
plugins/modules/k8s_drain.py
plugins/modules/k8s_taint.py

Reviewed-by: None <None>
This commit is contained in:
Abhijeet Kasurde
2022-02-15 20:17:33 +05:30
committed by GitHub
parent 1f79a03edf
commit 951be74dc0
4 changed files with 32 additions and 5 deletions

View File

@@ -142,7 +142,7 @@ from ansible_collections.kubernetes.core.plugins.module_utils.common import (
try:
from kubernetes.client.apis import core_v1_api
from kubernetes.stream import stream
from kubernetes.client.rest import ApiException
from kubernetes.client.exceptions import ApiException
except ImportError:
# ImportError are managed by the common module already.
pass