Bug #11178

error strings with % in them break messages

Added by Thomas McKay almost 3 years ago. Updated 11 months ago.

Status:Closed
Priority:Normal
Assigned To:Kavita Gaikwad
Category:Hammer core
Target version:Foreman - Team Anurag backlog
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/hammer-cli/pull/245
Story points-
Velocity based estimate-
Releasehammer-cli-0.11.0Release relationshipAuto

Description

Stack trace and error string below.

/home/thomasmckay/.rvm/gems/ruby-1.9.3-p547@hammer/gems/fast_gettext-0.9.2/lib/fast_gettext/vendor/string.rb:70:in `%': malformed format string - %' (ArgumentError)
    from /home/thomasmckay/.rvm/gems/ruby-1.9.3-p547@hammer/gems/fast_gettext-0.9.2/lib/fast_gettext/vendor/string.rb:70:in `%'
    from /home/thomasmckay/code/hammer-cli/lib/hammer_cli/utils.rb:12:in `format'
    from /home/thomasmckay/code/hammer-cli/lib/hammer_cli/output/adapter/abstract.rb:27:in `print_error'
    from /home/thomasmckay/code/hammer-cli/lib/hammer_cli/output/output.rb:16:in `print_error'
    from /home/thomasmckay/code/hammer-cli/lib/hammer_cli/exception_handler.rb:45:in `print_error'

The error string being processed was

"Error: Operating system '<%#' not found
       Kickstart default,1,"Default Organization,Alpha Bit Soup",Default Location,Redhat,"<%#
kind: ptable
name: Kickstart default
oses:
- CentOS 5
- CentOS 6
- CentOS 7
- Fedora 16
- Fedora 17
- Fedora 18
- Fedora 19
- Fedora 20
- RedHat 5
- RedHat 6
- RedHat 7
%>
zerombr
clearpart --all --initlabel
autopart

",
" 


Related issues

Related to Hammer CLI - Tracker #14914: Tracker for output related issues New 05/03/2016

Associated revisions

Revision 2786b6ce
Added by Kavita Gaikwad 12 months ago

Fixes #11178 - error strings with % in them break messages

History

#1 Updated by Tomáš Strachota about 2 years ago

#2 Updated by Kavita Gaikwad 12 months ago

  • Assigned To set to Kavita Gaikwad

#3 Updated by The Foreman Bot 12 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli/pull/245 added

#4 Updated by Kavita Gaikwad 12 months ago

  • Target version set to Team Anurag backlog

#5 Updated by Kavita Gaikwad 12 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#6 Updated by Tomáš Strachota 11 months ago

  • Release set to hammer-cli-0.11.0

Also available in: Atom PDF