[why] When execute "compare os=opensuler -d os_version --color json", raise NameError: undefined local variable or method `matrixes_titles'.
Signed-off-by: Zhang Yuhang zhangyuhang25@huawei.com --- lib/compare_matrixes.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/compare_matrixes.rb b/lib/compare_matrixes.rb index 6c7d873..078028a 100644 --- a/lib/compare_matrixes.rb +++ b/lib/compare_matrixes.rb @@ -689,11 +689,11 @@ def get_field_str(field) end
# Print -def get_theme(matrixes_values, matrixes_title, theme) +def get_theme(matrixes_values, matrixes_titles, theme) theme = theme.to_sym if theme.is_a?(String) if theme == :html - print_html_result(matrixes_values, matrixes_title, false) - print_html_result(matrixes_values, matrixes_title, true) + print_html_result(matrixes_values, matrixes_titles, false) + print_html_result(matrixes_values, matrixes_titles, true) return elsif theme == :json return print_json_result(matrixes_values, matrixes_titles)
Reviewed-by: Wang Chenglong 18509160991@163.com
On Fri, Oct 30, 2020 at 10:41:32AM +0800, Zhang Yuhang wrote:
[why] When execute "compare os=opensuler -d os_version --color json", raise NameError: undefined local variable or method `matrixes_titles'.
Signed-off-by: Zhang Yuhang zhangyuhang25@huawei.com
lib/compare_matrixes.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/compare_matrixes.rb b/lib/compare_matrixes.rb index 6c7d873..078028a 100644 --- a/lib/compare_matrixes.rb +++ b/lib/compare_matrixes.rb @@ -689,11 +689,11 @@ def get_field_str(field) end
# Print -def get_theme(matrixes_values, matrixes_title, theme) +def get_theme(matrixes_values, matrixes_titles, theme) theme = theme.to_sym if theme.is_a?(String) if theme == :html
- print_html_result(matrixes_values, matrixes_title, false)
- print_html_result(matrixes_values, matrixes_title, true)
- print_html_result(matrixes_values, matrixes_titles, false)
- print_html_result(matrixes_values, matrixes_titles, true) return elsif theme == :json return print_json_result(matrixes_values, matrixes_titles)
-- 2.23.0