Skip to content

Commit

Permalink
Refs #26050 - use rescue if exclude not present
Browse files Browse the repository at this point in the history
  • Loading branch information
upadhyeammit committed Mar 6, 2019
1 parent 21e274a commit f9c6ad6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion definitions/checks/yum_exclude.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ def run
end

def exclude_set?
yum_exclude == 'exclude =' || yum_exclude == 'exclude='
yum_exclude == 'exclude=' || yum_exclude == 'exclude ='
end

def yum_exclude
execute!('grep -w exclude /etc/yum.conf')
rescue ForemanMaintain::Error::ExecutionError
'exclude='
end
end

0 comments on commit f9c6ad6

Please sign in to comment.