Merge "Fix location update"

This commit is contained in:
Jenkins
2016-03-11 22:52:55 +00:00
committed by Gerrit Code Review
3 changed files with 8 additions and 9 deletions
+4
View File
@@ -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: