juju-solutions / layer-apache-bigtop-base

Apache License 2.0
1 stars 5 forks source link

get lsb data from charmhelpers instead of platform #49

Open kwmonroe opened 8 years ago

kwmonroe commented 8 years ago

Cory says don't do this:

dist_name, _, dist_series = platform.linux_distribution()

Because:

This will work, but it's actually deprecated for versions of Python later than what's on Xenial. We could change it later, but charmhelpers.core.host.lsb_release() can give you the series as well.

Go find all the places we use this and switch to charmhelpers. Example:

https://github.com/juju-solutions/layer-apache-bigtop-base/blob/master/lib/charms/layer/apache_bigtop_base.py#L51

kwmonroe commented 7 years ago

Fixed at least some of this here:

https://github.com/juju-solutions/layer-apache-bigtop-base/pull/56

I'll leave this open while i look into other charms that may use platform.