From 9ce1a114516c72f7d46e69d203f0391c2da0f77a Mon Sep 17 00:00:00 2001 From: liyou01 Date: Thu, 7 Jan 2021 14:34:47 +0800 Subject: [PATCH] remove unicode from code Change-Id: Ie452dbdd42ec7ef34993572ac0b456562aabab79 --- api-ref/source/conf.py | 10 +++++----- doc/source/conf.py | 16 ++++++++-------- freezer_api/db/sqlalchemy/api.py | 12 ++++++------ releasenotes/source/conf.py | 16 ++++++++-------- 4 files changed, 27 insertions(+), 27 deletions(-) diff --git a/api-ref/source/conf.py b/api-ref/source/conf.py index c2a0a69b..29e2c52f 100644 --- a/api-ref/source/conf.py +++ b/api-ref/source/conf.py @@ -66,8 +66,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'Backup and Disaster Recovery Service API Reference' -copyright = u'2010-present, OpenStack Foundation' +project = 'Backup and Disaster Recovery Service API Reference' +copyright = '2010-present, OpenStack Foundation' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -212,9 +212,9 @@ htmlhelp_basename = 'freezerapidoc' # (source start file, target name, title, author, documentclass # [howto/manual]). latex_documents = [ - ('index', 'Freezerapi.tex', u'OpenStack Backup and Disaster Recovery ' - u'Service API Documentation', - u'OpenStack Foundation', 'manual'), + ('index', 'Freezerapi.tex', 'OpenStack Backup and Disaster Recovery ' + 'Service API Documentation', + 'OpenStack Foundation', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of diff --git a/doc/source/conf.py b/doc/source/conf.py index f17674bb..1829be45 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -46,8 +46,8 @@ master_doc = 'index' # General information about the project. openstackdocs_auto_name = False -project = u'freezer-api' -copyright = u'2016, OpenStack' +project = 'freezer-api' +copyright = '2016, OpenStack' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -191,8 +191,8 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'freezer-api.tex', u'freezer-api Documentation', - u'OpenStack', 'manual'), + ('index', 'freezer-api.tex', 'freezer-api Documentation', + 'OpenStack', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -221,8 +221,8 @@ latex_documents = [ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - ('index', 'freezer-api', u'freezer-api Documentation', - [u'OpenStack'], 1) + ('index', 'freezer-api', 'freezer-api Documentation', + ['OpenStack'], 1) ] # If true, show URL addresses after external links. @@ -235,8 +235,8 @@ man_pages = [ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - ('index', 'freezer-api', u'freezer-api Documentation', - u'OpenStack', 'freezer-api', 'One line description of project.', + ('index', 'freezer-api', 'freezer-api Documentation', + 'OpenStack', 'freezer-api', 'One line description of project.', 'Miscellaneous'), ] diff --git a/freezer_api/db/sqlalchemy/api.py b/freezer_api/db/sqlalchemy/api.py index e88494ac..dc536dd1 100644 --- a/freezer_api/db/sqlalchemy/api.py +++ b/freezer_api/db/sqlalchemy/api.py @@ -383,12 +383,12 @@ def get_client(user_id, project_id=None, client_id=None, offset=0, for client in result: clientmap = {} - clientmap[u'project_id'] = client.project_id - clientmap[u'user_id'] = client.user_id - clientmap[u'client'] = {u'uuid': client.uuid, - u'hostname': client.hostname, - u'client_id': client.client_id, - u'description': client.description} + clientmap['project_id'] = client.project_id + clientmap['user_id'] = client.user_id + clientmap['client'] = {'uuid': client.uuid, + 'hostname': client.hostname, + 'client_id': client.client_id, + 'description': client.description} clients.append(clientmap) # If search opt is wrong, filter will not work, diff --git a/releasenotes/source/conf.py b/releasenotes/source/conf.py index 6de92f20..b1800ca2 100644 --- a/releasenotes/source/conf.py +++ b/releasenotes/source/conf.py @@ -49,8 +49,8 @@ source_suffix = '.rst' master_doc = 'index' # General information about the project. -project = u'Freezer API Release Notes' -copyright = u'2016, Freezer developers' +project = 'Freezer API Release Notes' +copyright = '2016, Freezer developers' # Release notes are version independent. # The short X.Y version. @@ -199,8 +199,8 @@ latex_elements = { # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', 'FreezerAPI.tex', u'Freezer API Release Notes Documentation', - u'Freezer developers', 'manual'), + ('index', 'FreezerAPI.tex', 'Freezer API Release Notes Documentation', + 'Freezer developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the top of @@ -230,8 +230,8 @@ latex_documents = [ # (source start file, name, description, authors, manual section). man_pages = [ ('index', 'freezer-api', - u'Freezer API Release Notes Documentation', - [u'Freezer developers'], 1) + 'Freezer API Release Notes Documentation', + ['Freezer developers'], 1) ] # If true, show URL addresses after external links. @@ -245,8 +245,8 @@ man_pages = [ # dir menu entry, description, category) texinfo_documents = [ ('index', 'Freezer API', - u'Freezer API Release Notes Documentation', - u'Freezer developers', 'Freezer', + 'Freezer API Release Notes Documentation', + 'Freezer developers', 'Freezer', 'One line description of project.', 'Miscellaneous'), ]