summaryrefslogtreecommitdiff
path: root/cloudinit/ssh_util.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2013-03-01 16:10:53 -0500
committerScott Moser <smoser@ubuntu.com>2013-03-01 16:10:53 -0500
commita6ef326b46a7f99b7ec585df595ef41151705ceb (patch)
treeeb3f6f26f0be698967c4ec93492a34d0f3b8015a /cloudinit/ssh_util.py
parentd55c9ae845544871d6bf105b44f701b7076c8e35 (diff)
downloadcloud-init-git-a6ef326b46a7f99b7ec585df595ef41151705ceb.tar.gz
fix reversed logic
Diffstat (limited to 'cloudinit/ssh_util.py')
-rw-r--r--cloudinit/ssh_util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/ssh_util.py b/cloudinit/ssh_util.py
index 4b29661f..65fab117 100644
--- a/cloudinit/ssh_util.py
+++ b/cloudinit/ssh_util.py
@@ -176,11 +176,11 @@ def update_authorized_keys(old_entries, keys):
for i in range(0, len(old_entries)):
ent = old_entries[i]
- if ent.valid():
+ if not ent.valid():
continue
# Replace those with the same base64
for k in keys:
- if ent.valid():
+ if not ent.valid():
continue
if k.base64 == ent.base64:
# Replace it with our better one