From a1f20dff76b00c7502f005c2b597f49c89cc2a09 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Sat, 16 Jun 2012 13:23:32 -0700 Subject: Check instance id against none, and not just empty/false/0/none since 0 or empty might be valid --- cloudinit/handlers/boot_hook.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cloudinit/handlers') diff --git a/cloudinit/handlers/boot_hook.py b/cloudinit/handlers/boot_hook.py index fa675f09..456b8020 100644 --- a/cloudinit/handlers/boot_hook.py +++ b/cloudinit/handlers/boot_hook.py @@ -63,7 +63,7 @@ class BootHookPartHandler(handlers.Handler): filepath = self._write_part(payload, filename) try: env = os.environ.copy() - if self.instance_id: + if self.instance_id is not None: env['INSTANCE_ID'] = str(self.instance_id) util.subp([filepath], env=env) except util.ProcessExecutionError: -- cgit v1.2.3