From e2eedede1822e8e63abce098581bae2e4f3775c7 Mon Sep 17 00:00:00 2001 From: vanzhiganov Date: Sat, 5 Dec 2015 05:44:21 +0700 Subject: [PATCH] fix --- cloud_node_agent.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cloud_node_agent.py b/cloud_node_agent.py index ba90491..49a80e1 100644 --- a/cloud_node_agent.py +++ b/cloud_node_agent.py @@ -13,6 +13,8 @@ for task in tasks['results']: # container_create print task print '---------------------' + # TODO: take from task + template = 'ubuntu' if task['task'] == 'container_create': # TODO: update task status to 1 @@ -34,7 +36,7 @@ for task in tasks['results']: # create ssh_key.pub param_auth_key = '' - if 'ssh_key' in task['plain'] and task['plain']['ssh_key'] != '': + if 'ssh_key' in task['plain'] and task['plain']['ssh_key']: node.__container_authkey_create(container_id, task['plain']['ssh_key']) param_auth_key = '--auth-key /var/lib/gocloud/node/auth-keys/%s.pub' % container_id