summaryrefslogtreecommitdiff
path: root/cloudinit/ssh_util.py
diff options
context:
space:
mode:
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