[corey.bryant,trivial] Sync charm-helpers.

Pick up jinja2 fix that enables upgrading from the quantum-gateway
charm to neutron-gateway.
This commit is contained in:
Corey Bryant
2015-07-23 11:43:01 -04:00
parent 07a1b5b559
commit 33144611ae
3 changed files with 5 additions and 4 deletions

View File

@@ -29,8 +29,8 @@ from charmhelpers.contrib.openstack.utils import OPENSTACK_CODENAMES
try:
from jinja2 import FileSystemLoader, ChoiceLoader, Environment, exceptions
except ImportError:
# python-jinja2 may not be installed yet, or we're running unittests.
FileSystemLoader = ChoiceLoader = Environment = exceptions = None
apt_install('python-jinja2', fatal=True)
from jinja2 import FileSystemLoader, ChoiceLoader, Environment, exceptions
class OSConfigException(Exception):

View File

@@ -67,4 +67,4 @@ def is_device_mounted(device):
out = check_output(['mount']).decode('UTF-8')
if is_partition:
return bool(re.search(device + r"\b", out))
return bool(re.search(device + r"[0-9]+\b", out))
return bool(re.search(device + r"[0-9]*\b", out))

View File

@@ -21,6 +21,7 @@
# Charm Helpers Developers <juju@lists.ubuntu.com>
from __future__ import print_function
import copy
from distutils.version import LooseVersion
from functools import wraps
import glob
@@ -263,7 +264,7 @@ class Config(dict):
self.path = path or self.path
with open(self.path) as f:
self._prev_dict = json.load(f)
for k, v in self._prev_dict.items():
for k, v in copy.deepcopy(self._prev_dict).items():
if k not in self:
self[k] = v