diff options
author | Joshua Harlow <harlowja@gmail.com> | 2013-09-06 23:54:51 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2013-09-06 23:54:51 -0700 |
commit | 2ee2d10a042c96160e4745431d1d0c25904b5d88 (patch) | |
tree | d7741ccd8d456bb0e6b79fbcd86f73e4348ebb40 /cloudinit/config/cc_seed_random.py | |
parent | e058913486519c2a9e036aad95f6e029dbc89966 (diff) | |
download | vyos-cloud-init-2ee2d10a042c96160e4745431d1d0c25904b5d88.tar.gz vyos-cloud-init-2ee2d10a042c96160e4745431d1d0c25904b5d88.zip |
Ensure validate checks key existence.
Diffstat (limited to 'cloudinit/config/cc_seed_random.py')
-rw-r--r-- | cloudinit/config/cc_seed_random.py | 2 |
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: |