juju-solutions / jujuresources

Manage binary resources for charms
MIT License
2 stars 4 forks source link

need a resource_exists helper method #14

Open kwmonroe opened 8 years ago

kwmonroe commented 8 years ago

We're overloading resource_path to check if a resource is defined in resources.yaml:

https://github.com/juju-solutions/jujubigdata/commit/f85810a39692fb0afabf887484a25b7f1c09262d#diff-60372d2e37ad7f03e06ddd710fc8ac0cR60

This throws a KeyError if not defined, which works for now, but we should have a proper resource_exists method to check for the existence of a resource in resources.yaml. Otherwise, future changes to resource_path may alter the KeyError that we're relying to on to conditionally fetch hadoop and hadoop-lzo resources in HadoopBase.