mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
[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>
This commit is contained in:
parent
8152cb3e1f
commit
5ea44edc64
2 changed files with 4 additions and 2 deletions
|
@ -618,7 +618,7 @@ class LXDContainerManagement(object):
|
|||
data = (self._get_instance_state_json() or {}).get('metadata', None) or {}
|
||||
network = {
|
||||
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
|
||||
}
|
||||
addresses = {
|
||||
|
@ -768,7 +768,7 @@ class LXDContainerManagement(object):
|
|||
self.old_instance_json = self._get_instance_json()
|
||||
self.old_sections = {
|
||||
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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue