diff options
author | Scott Moser <smoser@ubuntu.com> | 2012-01-12 16:55:50 +0100 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2012-01-12 16:55:50 +0100 |
commit | 121e17d15dcf311f8e629788d74df10f7c291676 (patch) | |
tree | 7539ebfbd59a271fdc50cdfdd3ddd78f1bfc2ca0 /cloudinit/DataSource.py | |
parent | 38f913377554f27159171a505b5805ee2537a905 (diff) | |
download | vyos-cloud-init-121e17d15dcf311f8e629788d74df10f7c291676.tar.gz vyos-cloud-init-121e17d15dcf311f8e629788d74df10f7c291676.zip |
[PATCH 11/13] Fix pylint warnings W0141 (used builtin function xyz)
From: Juerg Haefliger <juerg.haefliger@hp.com>
Replace superseded builtin functions 'filter' and 'map' using
list comprehension.
Diffstat (limited to 'cloudinit/DataSource.py')
-rw-r--r-- | cloudinit/DataSource.py | 4 |
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) |