netplan.Config().config should initialize to a dict

Normally netplan.Config().config is a dict as produced by
yaml.safe_load(). However, on systems without any netplan configs that
is not true. The subiquity code that calls into this function expects
.config to be a dictionary. When it's not
subiquitycore/models/network.py produces traceback that "list does not
have get method" when trying to get 'network' key.
This commit is contained in:
Dimitri John Ledkov 2019-05-02 15:22:23 +01:00
parent 62a7f5fbad
commit fee6fe6947
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ class Config:
def __init__(self):
self.devices = []
self.config = []
self.config = {}
def parse_netplan_config(self, config):
try: