diff --git a/python-k8sapp-openstack/k8sapp_openstack/k8sapp_openstack/helm/openstack.py b/python-k8sapp-openstack/k8sapp_openstack/k8sapp_openstack/helm/openstack.py index 02770224..47375022 100644 --- a/python-k8sapp-openstack/k8sapp_openstack/k8sapp_openstack/helm/openstack.py +++ b/python-k8sapp-openstack/k8sapp_openstack/k8sapp_openstack/helm/openstack.py @@ -5,6 +5,7 @@ # from eventlet.green import subprocess +import base64 import keyring import os @@ -602,7 +603,7 @@ class OpenstackBaseHelm(base.BaseHelm): kube = kubernetes.KubeOperator() keyring = kube.kube_get_secret(constants.K8S_RBD_PROV_ADMIN_SECRET_NAME, common.HELM_NS_STORAGE_PROVISIONER) - return keyring.data['key'].decode('base64', 'strict') + return base64.b64decode(keyring.data['key']).decode('utf-8') except Exception: pass diff --git a/python-k8sapp-openstack/k8sapp_openstack/pylint.rc b/python-k8sapp-openstack/k8sapp_openstack/pylint.rc index 86c6a837..1acd3c51 100755 --- a/python-k8sapp-openstack/k8sapp_openstack/pylint.rc +++ b/python-k8sapp-openstack/k8sapp_openstack/pylint.rc @@ -170,12 +170,11 @@ enable=E1603,E1609,E1610,E1602,E1606,E1608,E1607,E1605,E1604,E1601,E1611,W1652, # E1120: no-value-for-parameter # E1121: too-many-function-args # Disable Python3 checkers: -# W1618: no-absolute-import -# W1646: invalid-str-codec +# W1618: no-absolute-import disable=C, R, fixme, W0101, W0105, W0106, W0107, W0108, W0110, W0123, W0150, W0201, W0211, W0212, W0221, W0223, W0231, W0235, W0311, W0402, W0403, W0404, W0603, W0612, W0613, W0621, W0622, W0631, W0632, W0701, W0703, - W1113, W1201, W1401, W1505, W1618, W1646, + W1113, W1201, W1401, W1505, W1618, E0213, E0401, E0604, E0633, E0701, E1102, E1120, E1121 [REPORTS] diff --git a/tox.ini b/tox.ini index 653ee73f..e7140039 100644 --- a/tox.ini +++ b/tox.ini @@ -33,5 +33,5 @@ commands = {[testenv:bashate]commands} [testenv:pylint] -basepython = python2.7 +basepython = python3 description = Dummy environment to allow pylint to run in subdir tox