summaryrefslogtreecommitdiff
path: root/cloudinit
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-16 13:25:15 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-16 13:25:15 -0700
commit9249e20d87ad7827405dfd04ec98c72955044d7f (patch)
tree3409341584f64cb9e61fe9296cbb451a82576653 /cloudinit
parenta1f20dff76b00c7502f005c2b597f49c89cc2a09 (diff)
downloadvyos-cloud-init-9249e20d87ad7827405dfd04ec98c72955044d7f.tar.gz
vyos-cloud-init-9249e20d87ad7827405dfd04ec98c72955044d7f.zip
Revert that last change for this file, it should be a string that is non-empty so checking against that is fine
Diffstat (limited to 'cloudinit')
-rw-r--r--cloudinit/stages.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/stages.py b/cloudinit/stages.py
index c2d78a78..05b59852 100644
--- a/cloudinit/stages.py
+++ b/cloudinit/stages.py
@@ -239,7 +239,7 @@ class Init(object):
previous_ds = util.load_file(ds_fn).strip()
except Exception:
pass
- if previous_ds is None:
+ if not previous_ds:
# TODO: ?? is this right
previous_ds = ds
util.write_file(ds_fn, "%s\n" % ds)
@@ -255,7 +255,7 @@ class Init(object):
previous_iid = util.load_file(p_iid_fn).strip()
except Exception:
pass
- if previous_iid is None:
+ if not previous_iid:
# TODO: ?? is this right
previous_iid = iid
util.write_file(c_iid_fn, "%s\n" % iid)