Browse Source

Re-enable important py3k checks for openstack-armada-app

Re-enabling some of the disabled tox warnings present on
the pylint.rc file
Re-enabling:
W1646: invalid-str-codec

Story: 2006796
Task: 43329
Signed-off-by: Bernardo Decco <bernardo.deccodesiqueira@windriver.com>
Change-Id: I2fdb91154510e839cab4804a5ef223f2cdd58cec
changes/76/809276/6
Bernardo Decco 4 months ago
committed by Bernardo Decco de Siqueira
parent
commit
9b7979d5d1
  1. 3
      python-k8sapp-openstack/k8sapp_openstack/k8sapp_openstack/helm/openstack.py
  2. 5
      python-k8sapp-openstack/k8sapp_openstack/pylint.rc
  3. 2
      tox.ini

3
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

5
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]

2
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

Loading…
Cancel
Save