Ensure we have python3-jinja2
Also remove the conditional installs of python2 packages Change-Id: I48e08c85d50080bf92d3b14882d9ce664fdb3621
This commit is contained in:
parent
02b406b6f3
commit
fa9633f87a
|
@ -2,7 +2,7 @@
|
|||
# Wrapper to deal with newer Ubuntu versions that don't have py2 installed
|
||||
# by default.
|
||||
|
||||
declare -a DEPS=('apt' 'netaddr' 'netifaces' 'pip' 'yaml' 'dnspython')
|
||||
declare -a DEPS=('apt' 'netaddr' 'netifaces' 'pip' 'yaml' 'dnspython' 'jinja2')
|
||||
|
||||
check_and_install() {
|
||||
pkg="${1}-${2}"
|
||||
|
|
|
@ -75,24 +75,9 @@ from charmhelpers.contrib.hahelpers.cluster import (
|
|||
)
|
||||
from charmhelpers.contrib.network import ip as utils
|
||||
|
||||
try:
|
||||
import netifaces
|
||||
except ImportError:
|
||||
apt_install('python-netifaces')
|
||||
import netifaces
|
||||
|
||||
try:
|
||||
from netaddr import IPNetwork
|
||||
except ImportError:
|
||||
apt_install('python-netaddr', fatal=True)
|
||||
from netaddr import IPNetwork
|
||||
|
||||
|
||||
try:
|
||||
import jinja2
|
||||
except ImportError:
|
||||
apt_install('python-jinja2', fatal=True)
|
||||
import jinja2
|
||||
import netifaces
|
||||
from netaddr import IPNetwork
|
||||
import jinja2
|
||||
|
||||
|
||||
TEMPLATES_DIR = 'templates'
|
||||
|
|
Loading…
Reference in New Issue