Skip to content

Commit

Permalink
Coding style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mneagul committed Feb 11, 2014
1 parent bea2f4a commit 5ff38c7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/sct/cloudinit.py
Expand Up @@ -246,7 +246,7 @@ def generate(self, compress=True):
return self._generate()

strfd = StringIO.StringIO()
with gzip.GzipFile(fileobj=strfd, mode="w",compresslevel=9) as gzfd:
with gzip.GzipFile(fileobj=strfd, mode="w", compresslevel=9) as gzfd:
gzfd.write(self._generate())
strfd.seek(0)

Expand Down
7 changes: 4 additions & 3 deletions src/sct/cluster.py
Expand Up @@ -141,7 +141,8 @@ def create(self, name, image, size, security_group, module_repository_url, modul
cluster_nodes_config["management_node"] = {'name': management_node_name,
'instance_id': node["instance_id"],
'ip': node["ip"],
'private_ips': node["private_ips"]
'private_ips': node["private_ips"],
'hmac_secret': hmac_secret
}
return True

Expand Down Expand Up @@ -200,7 +201,7 @@ def add_node(self, template_name, cluster_name):
template['max-node-count'], template_name)
return False

mgmt_node_config = cluster_config.setdefault('nodes',{}).get('management_node', None)
mgmt_node_config = cluster_config.setdefault('nodes', {}).get('management_node', None)
if mgmt_node_config is None:
log.error("Invalid cluster. Management node is missing. Aborting")
return False
Expand All @@ -219,7 +220,7 @@ def add_node(self, template_name, cluster_name):
if template_nodes_count == 0:
node_index = 1
else:
for idx in range(1, template_nodes_count+2):
for idx in range(1, template_nodes_count + 2):
desired_node_name = "%s_%s_%s" % (cluster_name, cloudInitHandler.shortName, idx)
if desired_node_name in node_names:
continue
Expand Down

0 comments on commit 5ff38c7

Please sign in to comment.