sailesh1993 / rpms / cloud-init

Forked from rpms/cloud-init a year ago
Clone
3956c3
From a11ca2707b4b1330d3e4c83c6cf37295909bd0fc Mon Sep 17 00:00:00 2001
3956c3
From: Ryan McCabe <rmccabe@redhat.com>
3956c3
Date: Mon, 15 Jan 2018 09:23:09 -0500
3956c3
Subject: [PATCH] sysconfig: Fix traceback
3956c3
3956c3
Fix a typo that caused a traceback in some situations that was introduced
3956c3
as part of the fix for rhbz#1489270
3956c3
3956c3
Signed-off-by: Ryan McCabe <rmccabe@redhat.com>
3956c3
Resolves: rhbz#1489270
3956c3
---
3956c3
 cloudinit/net/sysconfig.py | 2 +-
3956c3
 1 file changed, 1 insertion(+), 1 deletion(-)
3956c3
3956c3
diff --git a/cloudinit/net/sysconfig.py b/cloudinit/net/sysconfig.py
3956c3
index bff844cd..3c5d0615 100644
3956c3
--- a/cloudinit/net/sysconfig.py
3956c3
+++ b/cloudinit/net/sysconfig.py
3956c3
@@ -359,7 +359,7 @@ class Renderer(renderer.Renderer):
3956c3
                         iface_cfg['DOMAIN'] = subnet['dns_search']
3956c3
 
3956c3
                 if 'dns_nameservers' in subnet:
3956c3
-                    if isinstance(subnet['dns_search'], (list, tuple)):
3956c3
+                    if isinstance(subnet['dns_nameservers'], (list, tuple)):
3956c3
                         # Currently limited to 3 entries per resolv.conf(5)
3956c3
                         dns_list = subnet['dns_nameservers'][:3]
3956c3
                         for i, k in enumerate(dns_list, 1):
3956c3
-- 
3956c3
2.14.3
3956c3