From 7659f06379122218e11ef445cd1f435ea5e74f40 Mon Sep 17 00:00:00 2001 From: Vlastimil Holer Date: Tue, 28 Jan 2014 19:09:46 +0100 Subject: Allow zeros when detecting IPv4 address (e.g. 192.168.0.1) --- cloudinit/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cloudinit') diff --git a/cloudinit/util.py b/cloudinit/util.py index b3332acd..61bcdeb1 100644 --- a/cloudinit/util.py +++ b/cloudinit/util.py @@ -369,7 +369,7 @@ def is_ipv4(instr): return False try: - toks = [x for x in toks if (int(x) < 256 and int(x) > 0)] + toks = [x for x in toks if (int(x) < 256 and int(x) >= 0)] except: return False -- cgit v1.2.3