diff options
author | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-16 13:33:06 -0700 |
---|---|---|
committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2012-06-16 13:33:06 -0700 |
commit | a5e15033e70ec3cea877879d0070480f6a7efe49 (patch) | |
tree | bdc3ecd1678beb0a16968ecc2f2f6e85bcd1a007 | |
parent | 1154876da44e1fd4516807637c317ce9828fe08b (diff) | |
download | vyos-cloud-init-a5e15033e70ec3cea877879d0070480f6a7efe49.tar.gz vyos-cloud-init-a5e15033e70ec3cea877879d0070480f6a7efe49.zip |
Comments about checking if this is right, no longer needed
-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): |