From 86712360f345866e108e12eda1075101635dd1ec Mon Sep 17 00:00:00 2001
From: LiZekun <2954674728@qq.com>
Date: Wed, 5 Jan 2022 10:44:00 +0800
Subject: [PATCH] remove unicode from code

Change-Id: I086d90b6f46e31582d412b8725e48cba5c21d6bc
---
 castellan/key_manager/barbican_key_manager.py    |  4 ++--
 .../key_manager/test_barbican_key_manager.py     | 12 ++++++------
 doc/source/conf.py                               |  8 ++++----
 releasenotes/source/conf.py                      | 16 ++++++++--------
 4 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/castellan/key_manager/barbican_key_manager.py b/castellan/key_manager/barbican_key_manager.py
index 7c58c4a3..4a18abef 100644
--- a/castellan/key_manager/barbican_key_manager.py
+++ b/castellan/key_manager/barbican_key_manager.py
@@ -433,8 +433,8 @@ class BarbicanKeyManager(key_manager.KeyManager):
         Barbican key creation is done asynchronously, so this loop continues
         checking until the order is active or a timeout occurs.
         """
-        active_status = u'ACTIVE'
-        error_status = u'ERROR'
+        active_status = 'ACTIVE'
+        error_status = 'ERROR'
         number_of_retries = self.conf.barbican.number_of_retries
         retry_delay = self.conf.barbican.retry_delay
         order = barbican_client.orders.get(order_ref)
diff --git a/castellan/tests/unit/key_manager/test_barbican_key_manager.py b/castellan/tests/unit/key_manager/test_barbican_key_manager.py
index a746c8e1..a92c3199 100644
--- a/castellan/tests/unit/key_manager/test_barbican_key_manager.py
+++ b/castellan/tests/unit/key_manager/test_barbican_key_manager.py
@@ -293,7 +293,7 @@ class BarbicanKeyManagerTestCase(test_key_manager.KeyManagerTestCase):
         # Create order and assign return value
         order = mock.Mock()
         order.secret_ref = self.secret_ref
-        order.status = u'ACTIVE'
+        order.status = 'ACTIVE'
         self.mock_barbican.orders.get.return_value = order
 
         # Create the key, get the UUID
@@ -330,7 +330,7 @@ class BarbicanKeyManagerTestCase(test_key_manager.KeyManagerTestCase):
         container_id = "16caa8f4-dd34-4fb3-bf67-6c20533a30e4"
         container_ref = ("http://localhost:9311/v1/containers/" + container_id)
         order.container_ref = container_ref
-        order.status = u'ACTIVE'
+        order.status = 'ACTIVE'
         self.mock_barbican.orders.get.return_value = order
 
         # Create container and assign return value
@@ -503,12 +503,12 @@ class BarbicanKeyManagerTestCase(test_key_manager.KeyManagerTestCase):
                          "4fe939b7-72bc-49aa-bd1e-e979589858af")
 
         pending_order = mock.Mock()
-        pending_order.status = u'PENDING'
+        pending_order.status = 'PENDING'
         pending_order.order_ref = order_ref_url
 
         active_order = mock.Mock()
         active_order.secret_ref = self.secret_ref
-        active_order.status = u'ACTIVE'
+        active_order.status = 'ACTIVE'
         active_order.order_ref = order_ref_url
 
         self.mock_barbican.orders.get.side_effect = [pending_order,
@@ -528,7 +528,7 @@ class BarbicanKeyManagerTestCase(test_key_manager.KeyManagerTestCase):
         number_of_retries = self.key_mgr.conf.barbican.number_of_retries
 
         pending_order = mock.Mock()
-        pending_order.status = u'PENDING'
+        pending_order.status = 'PENDING'
         pending_order.order_ref = order_ref_url
 
         self.mock_barbican.orders.get.return_value = pending_order
@@ -546,7 +546,7 @@ class BarbicanKeyManagerTestCase(test_key_manager.KeyManagerTestCase):
                          "4fe939b7-72bc-49aa-bd1e-e979589858af")
 
         error_order = mock.Mock()
-        error_order.status = u'ERROR'
+        error_order.status = 'ERROR'
         error_order.order_ref = order_ref_url
         error_order.error_status_code = u"500"
         error_order.error_reason = u"Test Error"
diff --git a/doc/source/conf.py b/doc/source/conf.py
index bb9dd3d6..56516691 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -38,8 +38,8 @@ source_suffix = '.rst'
 master_doc = 'index'
 
 # General information about the project.
-project = u'castellan'
-copyright = u'2013, OpenStack Foundation'
+project = 'castellan'
+copyright = '2013, OpenStack Foundation'
 
 # If true, '()' will be appended to :func: etc. cross-reference text.
 add_function_parentheses = True
@@ -72,8 +72,8 @@ html_extra_path = ['_extra']
 latex_documents = [
     ('index',
      'doc-castellan.tex',
-     u'%s Documentation' % project,
-     u'OpenStack Foundation', 'manual'),
+     '%s Documentation' % project,
+     'OpenStack Foundation', 'manual'),
 ]
 
 latex_elements = {
diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py
index 1dde6ae9..174b365b 100644
--- a/releasenotes/source/conf.py
+++ b/releasenotes/source/conf.py
@@ -56,8 +56,8 @@ openstackdocs_repo_name = 'openstack/castellan'
 openstackdocs_auto_name = False
 openstackdocs_bug_project = 'castellan'
 openstackdocs_bug_tag = 'doc'
-project = u'Castellan Release Notes'
-copyright = u'2017, Castellan Developers'
+project = 'Castellan Release Notes'
+copyright = '2017, Castellan Developers'
 
 # Release notes do not need a version number in the title, they
 # cover multiple releases.
@@ -204,8 +204,8 @@ latex_elements = {
 #  author, documentclass [howto, manual, or own class]).
 latex_documents = [
     ('index', 'CastellanReleaseNotes.tex',
-     u'Castellan Release Notes Documentation',
-     u'Castellan Developers', 'manual'),
+     'Castellan Release Notes Documentation',
+     'Castellan Developers', 'manual'),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
@@ -235,8 +235,8 @@ latex_documents = [
 # (source start file, name, description, authors, manual section).
 man_pages = [
     ('index', 'castellanreleasenotes',
-     u'Castellan Release Notes Documentation',
-     [u'Castellan Developers'], 1)
+     'Castellan Release Notes Documentation',
+     ['Castellan Developers'], 1)
 ]
 
 # If true, show URL addresses after external links.
@@ -250,8 +250,8 @@ man_pages = [
 #  dir menu entry, description, category)
 texinfo_documents = [
     ('index', 'CastellanReleaseNotes',
-     u'Castellan Release Notes Documentation',
-     u'Castellan Developers', 'CastellanReleaseNotes',
+     'Castellan Release Notes Documentation',
+     'Castellan Developers', 'CastellanReleaseNotes',
      'One line description of project.',
      'Miscellaneous'),
 ]