diff options
Diffstat (limited to 'cloudinit')
-rw-r--r-- | cloudinit/stages.py | 10 |
1 files 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): |