diff options
author | zdc <zdc@users.noreply.github.com> | 2022-04-07 20:24:57 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 20:24:57 +0300 |
commit | 45c1d42e15f4a5fe5e176e1516b2da9d21e7837a (patch) | |
tree | 0535c3cf76b60dbf585416b4490c5bd9c9c99359 /cloudinit/sources/helpers/vmware/imc/config_file.py | |
parent | 96226f37cdbdaef2fbc51de7b9ca75b61a16792b (diff) | |
parent | aa60d48c2711cdcd9f88a4e5c77379adb0408231 (diff) | |
download | vyos-cloud-init-45c1d42e15f4a5fe5e176e1516b2da9d21e7837a.tar.gz vyos-cloud-init-45c1d42e15f4a5fe5e176e1516b2da9d21e7837a.zip |
Merge pull request #52 from vyos/current
T2117: Backport Cloud-init 22.1 with our changes to VyOS 1.3
Diffstat (limited to 'cloudinit/sources/helpers/vmware/imc/config_file.py')
-rw-r--r-- | cloudinit/sources/helpers/vmware/imc/config_file.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cloudinit/sources/helpers/vmware/imc/config_file.py b/cloudinit/sources/helpers/vmware/imc/config_file.py index fc034c95..845294ec 100644 --- a/cloudinit/sources/helpers/vmware/imc/config_file.py +++ b/cloudinit/sources/helpers/vmware/imc/config_file.py @@ -35,7 +35,7 @@ class ConfigFile(ConfigSource, dict): key = key.strip() val = val.strip() - if key.startswith('-') or '|-' in key: + if key.startswith("-") or "|-" in key: canLog = False else: canLog = True @@ -59,7 +59,7 @@ class ConfigFile(ConfigSource, dict): Keyword arguments: filename - The full path to the config file. """ - logger.info('Parsing the config file %s.', filename) + logger.info("Parsing the config file %s.", filename) config = configparser.ConfigParser() config.optionxform = str @@ -71,7 +71,7 @@ class ConfigFile(ConfigSource, dict): logger.debug("FOUND CATEGORY = '%s'", category) for (key, value) in config.items(category): - self._insertKey(category + '|' + key, value) + self._insertKey(category + "|" + key, value) def should_keep_current_value(self, key): """ @@ -115,4 +115,5 @@ class ConfigFile(ConfigSource, dict): """ return len([key for key in self if key.startswith(prefix)]) + # vi: ts=4 expandtab |