Bug 1346363

Summary: hammer doesnt work with a "config" file in pwd
Product: Red Hat Satellite Reporter: Sean O'Keeffe <sokeeffe>
Component: HammerAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.8CC: bbuckingham, bkearney, chartwel
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/15425
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-16 11:46:04 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sean O'Keeffe 2016-06-14 15:46:42 UTC
Description of problem:
Running hammer with a file called "config" and uncommented lines in cause hammer to fail.

Version-Release number of selected component (if applicable):
rubygem-hammer_cli-0.1.4.13-1.el7sat.noarch

How reproducible:
100%

Steps to Reproduce:
1. hammer --help (confirm it works fine)
2.cat /etc/sysconfig/selinux > config (this can be any file with uncommented text in)
3.hammer --help


Actual results:
[root@sat6 ~]# hammer --help
/usr/share/gems/gems/hammer_cli-0.1.4.13/lib/hammer_cli/settings.rb:83:in `symbolize_hash': undefined method `inject' for "SELINUX=enforcing":String (NoMethodError)
	from /usr/share/gems/gems/hammer_cli-0.1.4.13/lib/hammer_cli/settings.rb:71:in `deep_merge!'
	from /usr/share/gems/gems/hammer_cli-0.1.4.13/lib/hammer_cli/settings.rb:47:in `load'
	from /usr/share/gems/gems/hammer_cli-0.1.4.13/lib/hammer_cli/settings.rb:40:in `load_from_file'
	from /usr/share/gems/gems/hammer_cli-0.1.4.13/lib/hammer_cli/settings.rb:19:in `block in load_from_paths'
	from /usr/share/gems/gems/hammer_cli-0.1.4.13/lib/hammer_cli/settings.rb:16:in `each'
	from /usr/share/gems/gems/hammer_cli-0.1.4.13/lib/hammer_cli/settings.rb:16:in `load_from_paths'
	from /usr/share/gems/gems/hammer_cli-0.1.4.13/bin/hammer:52:in `<top (required)>'
	from /usr/bin/hammer:23:in `load'
	from /usr/bin/hammer:23:in `<main>'

Expected results:
hammer --help to display help message

Additional info:

Comment 1 Bryan Kearney 2016-06-15 17:24:02 UTC
Created redmine issue http://projects.theforeman.org/issues/15425 from this bug

Comment 3 Bryan Kearney 2016-06-16 11:46:04 UTC

*** This bug has been marked as a duplicate of bug 1255086 ***