summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@gmail.com>2013-09-06 23:54:51 -0700
committerJoshua Harlow <harlowja@gmail.com>2013-09-06 23:54:51 -0700
commit2ee2d10a042c96160e4745431d1d0c25904b5d88 (patch)
treed7741ccd8d456bb0e6b79fbcd86f73e4348ebb40 /cloudinit
parente058913486519c2a9e036aad95f6e029dbc89966 (diff)
downloadvyos-cloud-init-2ee2d10a042c96160e4745431d1d0c25904b5d88.tar.gz
vyos-cloud-init-2ee2d10a042c96160e4745431d1d0c25904b5d88.zip
Ensure validate checks key existence.
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/config/cc_seed_random.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/config/cc_seed_random.py b/cloudinit/config/cc_seed_random.py
index acacb8f7..592d253f 100644
--- a/cloudinit/config/cc_seed_random.py
+++ b/cloudinit/config/cc_seed_random.py
@@ -63,6 +63,8 @@ def validate(cfg):
"""Method that can be used to ask if the given configuration will be
accepted as valid by this module, without having to actually activate this
module."""
+ if not cfg or "random_seed" not in cfg:
+ return
try:
jsonschema.validate(cfg, schema)
except js_exc.ValidationError as e: