summaryrefslogtreecommitdiff
path: root/cloudinit/handlers/boot_hook.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/handlers/boot_hook.py')
-rw-r--r--cloudinit/handlers/boot_hook.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/cloudinit/handlers/boot_hook.py b/cloudinit/handlers/boot_hook.py
index 10f60b8d..fa675f09 100644
--- a/cloudinit/handlers/boot_hook.py
+++ b/cloudinit/handlers/boot_hook.py
@@ -32,10 +32,12 @@ LOG = logging.getLogger(__name__)
class BootHookPartHandler(handlers.Handler):
- def __init__(self, paths, instance_id, **_kwargs):
+ def __init__(self, paths, datasource, **_kwargs):
handlers.Handler.__init__(self, PER_ALWAYS)
self.boothook_dir = paths.get_ipath("boothooks")
- self.instance_id = instance_id
+ self.instance_id = None
+ if datasource:
+ self.instance_id = datasource.get_instance_id()
def list_types(self):
return [