Browse Source

Remove six

Remove six Replace the following items with Python 3 style code.
- six.moves.urllib
- six.binary_type

Change-Id: I234c3b205ee21b59953aa6ce7af5c2a1e4a6cfa6
changes/51/761051/1
wangzihao 4 months ago
parent
commit
0525790271
6 changed files with 5 additions and 7 deletions
  1. +1
    -1
      barbican_tempest_plugin/services/key_manager/json/consumer_client.py
  2. +1
    -1
      barbican_tempest_plugin/services/key_manager/json/container_client.py
  3. +1
    -1
      barbican_tempest_plugin/services/key_manager/json/order_client.py
  4. +1
    -1
      barbican_tempest_plugin/services/key_manager/json/quota_client.py
  5. +1
    -2
      barbican_tempest_plugin/services/key_manager/json/secret_client.py
  6. +0
    -1
      requirements.txt

+ 1
- 1
barbican_tempest_plugin/services/key_manager/json/consumer_client.py View File

@ -15,7 +15,7 @@
import json
from six.moves.urllib import parse as urllib
from urllib import parse as urllib
from tempest import config
from tempest.lib.common import rest_client


+ 1
- 1
barbican_tempest_plugin/services/key_manager/json/container_client.py View File

@ -15,7 +15,7 @@
import json
from six.moves.urllib import parse as urllib
from urllib import parse as urllib
from tempest import config
from tempest.lib.common import rest_client


+ 1
- 1
barbican_tempest_plugin/services/key_manager/json/order_client.py View File

@ -15,7 +15,7 @@
import json
from six.moves.urllib import parse as urllib
from urllib import parse as urllib
from tempest import config
from tempest.lib.common import rest_client


+ 1
- 1
barbican_tempest_plugin/services/key_manager/json/quota_client.py View File

@ -15,7 +15,7 @@
import json
from six.moves.urllib import parse as urllib
from urllib import parse as urllib
from tempest import config
from tempest.lib.common import rest_client


+ 1
- 2
barbican_tempest_plugin/services/key_manager/json/secret_client.py View File

@ -15,7 +15,6 @@
import json
import six
from tempest import config
from tempest.lib.common import rest_client
@ -29,7 +28,7 @@ class SecretClient(rest_client.RestClient):
if 'name' not in kwargs:
kwargs['name'] = data_utils.rand_name("tempest-sec")
if 'payload' in kwargs and type(kwargs['payload']) is six.binary_type:
if 'payload' in kwargs and type(kwargs['payload']) is bytes:
kwargs['payload'] = kwargs['payload'].decode('utf-8')
post_body = kwargs


+ 0
- 1
requirements.txt View File

@ -4,7 +4,6 @@
pbr!=2.1.0,>=2.0.0 # Apache-2.0
six>=1.10.0 # MIT
tempest>=17.1.0 # Apache-2.0
cryptography>=2.1 # BSD/Apache-2.0


Loading…
Cancel
Save