[PR #8895/0bf84ba2 backport][stable-9] fix comprehension (#8896)
fix comprehension (#8895)
* fix comprehension
* add changelog frag
* Update changelogs/fragments/8895-fix-comprehension.yaml
Co-authored-by: Felix Fontein <felix@fontein.de>
---------
Co-authored-by: Felix Fontein <felix@fontein.de>
(cherry picked from commit 0bf84ba2b6
)
Co-authored-by: Alexei Znamensky <103110+russoz@users.noreply.github.com>
pull/8903/head
parent
8152cb3e1f
commit
5ea44edc64
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- lxd_container - fix bug introduced in previous commit (https://github.com/ansible-collections/community.general/pull/8895, https://github.com/ansible-collections/community.general/issues/8888).
|
|
@ -618,7 +618,7 @@ class LXDContainerManagement(object):
|
||||||
data = (self._get_instance_state_json() or {}).get('metadata', None) or {}
|
data = (self._get_instance_state_json() or {}).get('metadata', None) or {}
|
||||||
network = {
|
network = {
|
||||||
k: v
|
k: v
|
||||||
for k, v in data.get('network', {}).items()
|
for k, v in (data.get('network') or {}).items()
|
||||||
if k not in ignore_devices
|
if k not in ignore_devices
|
||||||
}
|
}
|
||||||
addresses = {
|
addresses = {
|
||||||
|
@ -768,7 +768,7 @@ class LXDContainerManagement(object):
|
||||||
self.old_instance_json = self._get_instance_json()
|
self.old_instance_json = self._get_instance_json()
|
||||||
self.old_sections = {
|
self.old_sections = {
|
||||||
section: adjust_content(content)
|
section: adjust_content(content)
|
||||||
for section, content in self.old_instance_json.get('metadata', {}).items()
|
for section, content in (self.old_instance_json.get('metadata') or {}).items()
|
||||||
if section in set(CONFIG_PARAMS) - set(CONFIG_CREATION_PARAMS)
|
if section in set(CONFIG_PARAMS) - set(CONFIG_CREATION_PARAMS)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue