summaryrefslogtreecommitdiff
path: root/cloudinit/DataSource.py
diff options
context:
space:
mode:
Diffstat (limited to 'cloudinit/DataSource.py')
-rw-r--r--cloudinit/DataSource.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/DataSource.py b/cloudinit/DataSource.py
index 623f96b6..ac79f757 100644
--- a/cloudinit/DataSource.py
+++ b/cloudinit/DataSource.py
@@ -199,8 +199,8 @@ def is_ipv4(instr):
return False
try:
- filter(lambda x: int(x) < 256 and x > 0, toks)
+ toks = [x for x in toks if (int(x) < 256 and int(x) > 0)]
except:
return False
- return True
+ return (len(toks) == 4)