summaryrefslogtreecommitdiff
path: root/glanceclient/v2/shell.py
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-03-11 22:52:55 +0000
committerGerrit Code Review <review@openstack.org>2016-03-11 22:52:56 +0000
commitd59e341a4cd99a8488d5cf41052d9b218379ac87 (patch)
tree7e9c982eb397d6a58c729009810a8b03d4f42b07 /glanceclient/v2/shell.py
parentc853c78346e7cb86af765ff6919cdee963e3b6e0 (diff)
parent8b6dbb2065c5e12d150f15572df3dc0e269e7a81 (diff)
downloadpython-glanceclient-d59e341a4cd99a8488d5cf41052d9b218379ac87.tar.gz
Merge "Fix location update"
Diffstat (limited to 'glanceclient/v2/shell.py')
-rw-r--r--glanceclient/v2/shell.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/glanceclient/v2/shell.py b/glanceclient/v2/shell.py
index 5f0728e..1408027 100644
--- a/glanceclient/v2/shell.py
+++ b/glanceclient/v2/shell.py
@@ -430,6 +430,10 @@ def do_location_update(gc, args):
"""Update metadata of an image's location."""
try:
metadata = json.loads(args.metadata)
+
+ if metadata == {}:
+ print("WARNING -- The location's metadata will be updated to "
+ "an empty JSON object.")
except ValueError:
utils.exit('Metadata is not a valid JSON object.')
else: