~gz/python-novaclient/volumes_os_prefix

« back to all changes in this revision

Viewing changes to novaclient/v1_1/shell.py

  • Committer: Scott Moser
  • Date: 2012-02-18 00:37:22 UTC
  • Revision ID: git-v1:cec7069aa386eb48d432511932b197f50cab7fb0
allow '=' inside value of --meta=key=value

Previously, you could not specify '--meta=mykey=value=1', as the
second '=' would cause an exception when creating a dictionary.

The key name cannot contain a '=', but the value can, so we split only
once on '='.

Fixes bug 934515.

Change-Id: Ia416c3df59283fa963eb80370457e6c481336915

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
    flavor = args.flavor
47
47
    image = args.image
48
48
 
49
 
    meta = dict(v.split('=') for v in args.meta)
 
49
    meta = dict(v.split('=', 1) for v in args.meta)
50
50
 
51
51
    files = {}
52
52
    for f in args.files: