diff options
author | Joshua Harlow <harlowja@gmail.com> | 2013-07-21 11:04:55 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@gmail.com> | 2013-07-21 11:04:55 -0700 |
commit | d655d019fb0a45389d87db39b0ef5001e27e2616 (patch) | |
tree | f40e5127bbff68e0efcc23810365f2fe9abe7741 | |
parent | a5dd2146bb98874219eb449ae06f57203099d4d4 (diff) | |
download | vyos-cloud-init-d655d019fb0a45389d87db39b0ef5001e27e2616.tar.gz vyos-cloud-init-d655d019fb0a45389d87db39b0ef5001e27e2616.zip |
Ensure what we are searching over is a directory.
-rw-r--r-- | cloudinit/stages.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/stages.py b/cloudinit/stages.py index f08589a7..3e49e8c5 100644 --- a/cloudinit/stages.py +++ b/cloudinit/stages.py @@ -360,6 +360,8 @@ class Init(object): def register_handlers_in_dir(path): # Attempts to register any handler modules under the given path. + if not path or not os.path.isdir(path): + return potential_handlers = util.find_modules(path) for (fname, mod_name) in potential_handlers.iteritems(): try: |