Browse Source

Default ssh keys to empty list

If the node doesn't have ssh keys defined we currently rely on
nodepool adding an empty list of ssh keys. Instead be safe and default
to an empty list.

Change-Id: I1cbac643f47923b18959153f318d3d2fdc9626cd
tags/3.5.0
Tobias Henkel 5 months ago
parent
commit
e8dcc42c09
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      zuul/executor/server.py

+ 1
- 1
zuul/executor/server.py View File

@@ -1269,7 +1269,7 @@ class AnsibleJob(object):
1269 1269
                                 self.winrm_read_timeout
1270 1270
 
1271 1271
                 host_keys = []
1272
-                for key in node.get('host_keys'):
1272
+                for key in node.get('host_keys', []):
1273 1273
                     if port != 22:
1274 1274
                         host_keys.append("[%s]:%s %s" % (ip, port, key))
1275 1275
                     else:

Loading…
Cancel
Save