diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2014-03-05 14:41:16 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2014-03-05 14:41:16 -0800 |
commit | 7bd5a1248df8245695da5eda7522977f57646d18 (patch) | |
tree | 0e7b5f611fc819329c3fb040a24320d4fec153bf /lib/chef/client.rb | |
parent | 442a81c4a52352e93c6621bf3dffbfe5a9a17bd2 (diff) | |
download | chef-7bd5a1248df8245695da5eda7522977f57646d18.tar.gz |
move exception message into object
Diffstat (limited to 'lib/chef/client.rb')
-rw-r--r-- | lib/chef/client.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/chef/client.rb b/lib/chef/client.rb index 5ea2d236b2..ac814333b4 100644 --- a/lib/chef/client.rb +++ b/lib/chef/client.rb @@ -296,10 +296,7 @@ class Chef name = Chef::Config[:node_name] || ohai[:fqdn] || ohai[:machinename] || ohai[:hostname] Chef::Config[:node_name] = name - unless name - msg = "Unable to determine node name: configure node_name or configure the system's hostname and fqdn" - raise Chef::Exceptions::CannotDetermineNodeName, msg - end + raise Chef::Exceptions::CannotDetermineNodeName unless name # node names > 90 bytes only work with authentication protocol >= 1.1 # see discussion in config.rb. |