Commit 466636c9 authored by Stavros Sachtouris's avatar Stavros Sachtouris
Browse files

Fix bug when setting an empty cloud alias

parent fc48b144
......@@ -129,7 +129,12 @@ class config_set(_command_init):
section, sep, key = option.rpartition('.')
prefix = 'cloud.'
if section.startswith(prefix):
self.config.set_cloud(section[len(prefix):], key, value)
cloudname = section[len(prefix):]
if cloudname:
self.config.set_cloud(cloudname, key, value)
raise CLISyntaxError(
'Empty cloud alias (%s)' % option, importance=2)
elif section in ('cloud',):
raise CLISyntaxError(
'Invalid syntax for cloud definition', importance=2, details=[
......@@ -803,7 +803,7 @@ class image_compute_properties_add(_init_cyclades, _optional_json):
class image_compute_properties_set(_init_cyclades, _optional_json):
"""Add / update a set of properties for an image
proeprties must be given in the form key=value, e.v.
properties must be given in the form key=value, e.v.
/image compute properties set <image-id> key1=val1 key2=val2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment