From a5e15033e70ec3cea877879d0070480f6a7efe49 Mon Sep 17 00:00:00 2001 From: Joshua Harlow Date: Sat, 16 Jun 2012 13:33:06 -0700 Subject: Comments about checking if this is right, no longer needed --- cloudinit/stages.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/cloudinit/stages.py b/cloudinit/stages.py index ddac2ac2..5a00eae3 100644 --- a/cloudinit/stages.py +++ b/cloudinit/stages.py @@ -240,7 +240,6 @@ class Init(object): except Exception: pass if not previous_ds: - # TODO: ?? is this right previous_ds = ds util.write_file(ds_fn, "%s\n" % ds) util.write_file(os.path.join(dp, 'previous-datasource'), @@ -249,17 +248,16 @@ class Init(object): # What the instance id was and is... iid = self.datasource.get_instance_id() previous_iid = None - c_iid_fn = os.path.join(dp, 'instance-id') + iid_fn = os.path.join(dp, 'instance-id') try: - previous_iid = util.load_file(c_iid_fn).strip() + previous_iid = util.load_file(iid_fn).strip() except Exception: pass if not previous_iid: - # TODO: ?? is this right previous_iid = iid - util.write_file(c_iid_fn, "%s\n" % iid) + util.write_file(iid_fn, "%s\n" % iid) util.write_file(os.path.join(dp, 'previous-instance-id'), - "%s\n" % previous_iid) + "%s\n" % (previous_iid)) return iid def fetch(self): -- cgit v1.2.3