diff options
| author | Joshua Harlow <harlowja@yahoo-inc.com> | 2014-02-24 14:24:04 -0800 |
|---|---|---|
| committer | Joshua Harlow <harlowja@yahoo-inc.com> | 2014-02-24 14:24:04 -0800 |
| commit | ecdeff294c9ac5706486467ef68653d21f51b7e5 (patch) | |
| tree | 7217c1f9fa00c5323b1c94076c498234b3a1c1fe | |
| parent | 82c659d5473d4f06705c233bc43f5d5a8ba262f7 (diff) | |
| download | vyos-cloud-init-ecdeff294c9ac5706486467ef68653d21f51b7e5.tar.gz vyos-cloud-init-ecdeff294c9ac5706486467ef68653d21f51b7e5.zip | |
Ensure we strip the previous_iid file contents
The instance-id file contains the instance id
and a newline, to compare correctly make sure
we strip the newline before further usage.
| -rw-r--r-- | cloudinit/sources/DataSourceConfigDrive.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cloudinit/sources/DataSourceConfigDrive.py b/cloudinit/sources/DataSourceConfigDrive.py index 142e0eb8..6b79a949 100644 --- a/cloudinit/sources/DataSourceConfigDrive.py +++ b/cloudinit/sources/DataSourceConfigDrive.py @@ -181,7 +181,7 @@ def get_previous_iid(paths): # hasn't declared itself found. fname = os.path.join(paths.get_cpath('data'), 'instance-id') try: - return util.load_file(fname) + return util.load_file(fname).strip() except IOError: return None |
