Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenStack
oslo
python-oslo.upgradecheck
Commits
1e3ee03d
Commit
1e3ee03d
authored
Apr 16, 2021
by
Zuul
Committed by
Gerrit Code Review
Apr 16, 2021
Browse files
Merge "Remove six"
parents
b55f018f
456bd852
Changes
1
Hide whitespace changes
Inline
Side-by-side
oslo_upgradecheck/upgradecheck.py
View file @
1e3ee03d
...
...
@@ -21,7 +21,6 @@ import traceback
import
enum
from
oslo_config
import
cfg
import
prettytable
import
six
from
oslo_upgradecheck._i18n
import
_
...
...
@@ -128,10 +127,10 @@ class UpgradeCommands(object):
# assume that our locally defined option exists.
if
(
hasattr
(
CONF
,
'command'
)
and
hasattr
(
CONF
.
command
,
'json'
)
and
CONF
.
command
.
json
):
# NOTE(bnemec): We use s
ix.text_type
on the translated string to
# NOTE(bnemec): We use s
tr
on the translated string to
# force immediate translation if lazy translation is in use.
# See lp1801761 for details.
output
=
{
'name'
:
s
ix
.
text_type
(
self
.
display_title
),
'checks'
:
[]}
output
=
{
'name'
:
s
tr
(
self
.
display_title
),
'checks'
:
[]}
for
name
,
result
in
check_results
:
output
[
'checks'
].
append
(
{
'check'
:
name
,
...
...
@@ -140,11 +139,11 @@ class UpgradeCommands(object):
)
print
(
json
.
dumps
(
output
))
else
:
# NOTE(bnemec): We use s
ix.text_type
on the translated string to
# NOTE(bnemec): We use s
tr
on the translated string to
# force immediate translation if lazy translation is in use.
# See lp1801761 for details.
t
=
prettytable
.
PrettyTable
(
[
six
.
text_type
(
self
.
display_title
)],
hrules
=
prettytable
.
ALL
)
t
=
prettytable
.
PrettyTable
(
[
str
(
self
.
display_title
)],
hrules
=
prettytable
.
ALL
)
t
.
align
=
'l'
for
name
,
result
in
check_results
:
cell
=
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment