From 1829c08e5a8f83b4ce46be6afe2e0c8f0a97ed1a Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Thu, 7 Feb 2019 16:28:30 +0100 Subject: [PATCH] Move displayed checker title to be in variable Title of check command displayed to user is now moved to be defined as atribute of UpgradeCommands class. This will allow to override this command for projects which inherits from this class. This will be usefull for Neutron to use same class in new sanity-check tool which will be implemented in same way as upgrade-check is done. Change-Id: I8218b21a219db3a3198750fd98033aff244b7002 Related-Bug: #1809878 --- oslo_upgradecheck/upgradecheck.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oslo_upgradecheck/upgradecheck.py b/oslo_upgradecheck/upgradecheck.py index 3dab00c..97d539a 100644 --- a/oslo_upgradecheck/upgradecheck.py +++ b/oslo_upgradecheck/upgradecheck.py @@ -75,6 +75,7 @@ class UpgradeCommands(object): done through the sqlalchemy query language directly like the database schema migrations. """ + display_title = _('Upgrade Check Results') _upgrade_checks = () def _get_details(self, upgrade_check_result): @@ -120,8 +121,7 @@ class UpgradeCommands(object): # NOTE(bnemec): We use six.text_type on the translated string to # force immediate translation if lazy translation is in use. # See lp1801761 for details. - t = prettytable.PrettyTable([six.text_type(_('Upgrade Check Results')) - ], + t = prettytable.PrettyTable([six.text_type(self.display_title)], hrules=prettytable.ALL) t.align = 'l' for name, result in check_results: