summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_ntp.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/config/cc_ntp.py')
-rw-r--r--cloudinit/config/cc_ntp.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/cloudinit/config/cc_ntp.py b/cloudinit/config/cc_ntp.py
index 15ae1ecd..d43d060c 100644
--- a/cloudinit/config/cc_ntp.py
+++ b/cloudinit/config/cc_ntp.py
@@ -100,7 +100,9 @@ def handle(name, cfg, cloud, log, _args):
LOG.debug(
"Skipping module named %s, not present or disabled by cfg", name)
return
- ntp_cfg = cfg.get('ntp', {})
+ ntp_cfg = cfg['ntp']
+ if ntp_cfg is None:
+ ntp_cfg = {} # Allow empty config which will install the package
# TODO drop this when validate_cloudconfig_schema is strict=True
if not isinstance(ntp_cfg, (dict)):