proof dies if a 'type' is not specified for a config option

Bug #1321316 reported by Brad Crittenden
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juju Charm Tools
Fix Released
Undecided
Brad Crittenden

Bug Description

If a config.yaml option does not have a 'type' charm-proof cannot handle it and throws an exception, exiting ungracefully.

[bac]bac@trusty64:~/charms/precise$ bzr get lp:~springfield-team/charms/precise/nova-cloud-controller/trunk nova-cloud-controller
Branched 78 revisions.

[bac]bac@trusty64:~/charms/precise$ charm-proof nova-cloud-controller/
Traceback (most recent call last):
  File "/usr/bin/charm-proof", line 9, in <module>
    load_entry_point('charm-tools==1.2.10', 'console_scripts', 'charm-proof')()
  File "/usr/lib/python2.7/dist-packages/charmtools/proof.py", line 63, in main
    args.debug)
  File "/usr/lib/python2.7/dist-packages/charmtools/proof.py", line 56, in proof
    lint, err_code = c.proof(with_remote)
  File "/usr/lib/python2.7/dist-packages/charmtools/charms.py", line 412, in proof
    lint.check_config_file(charm_path)
  File "/usr/lib/python2.7/dist-packages/charmtools/charms.py", line 185, in check_config_file
    expected_type = KNOWN_OPTION_TYPES[option_value['type']]
KeyError: 'type'

Related branches

Brad Crittenden (bac)
Changed in charm-tools:
assignee: nobody → Brad Crittenden (bac)
status: New → In Progress
Brad Crittenden (bac)
Changed in charm-tools:
status: In Progress → Fix Committed
Marco Ceppi (marcoceppi)
Changed in charm-tools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.