Skip to content

Commit 4cf312f

Browse files
committed
Proposed fix for gh#264
1 parent 7740d7f commit 4cf312f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cm/chef.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
_d[m[0]] = m[1].strip("'").strip('"')
3838
# set global variables from client.rb
3939
CHEF_SERVER_URL = _d['chef_server_url']
40-
CHEF_NODE_NAME = _d['node_name']
41-
CHEF_CLIENT_NAME = _d['node_name']
40+
CHEF_NODE_NAME = _d.get('node_name', socket.hostname())
41+
CHEF_CLIENT_NAME = _d.get('node_name', socket.hostname())
4242
CHEF_VALIDATION_NAME = _d['validation_client_name']
4343
# read the client key
4444
_client_pem_path = os.path.join(CHEF_CONFIG_PATH, 'client.pem')

0 commit comments

Comments
 (0)