summaryrefslogtreecommitdiff
path: root/cloudinit/util.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-01-12 16:54:54 +0100
committerScott Moser <smoser@ubuntu.com>2012-01-12 16:54:54 +0100
commit6a2031c4dc005d9a0f42b10200b828eee5cf166f (patch)
treea57029f73b060b9e8ab6068d326f939dc479d191 /cloudinit/util.py
parent234cefd314a7e1cfb51fad3bdf344d801a8b238d (diff)
downloadvyos-cloud-init-6a2031c4dc005d9a0f42b10200b828eee5cf166f.tar.gz
vyos-cloud-init-6a2031c4dc005d9a0f42b10200b828eee5cf166f.zip
[PATCH 06/13] Fix pylint warnings W0612 (unused variable)
From: Juerg Haefliger <juerg.haefliger@hp.com>
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r--cloudinit/util.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index b45bb19e..90998297 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -264,7 +264,6 @@ def read_file_with_includes(fname, rel = ".", stack=[], patt = None):
stack.append(fname)
cur = 0
- clen = len(contents)
while True:
match = patt.search(contents[cur:])
if not match: break
@@ -443,7 +442,7 @@ def islxc():
# we're inside a container. otherwise, no
sp = subprocess.Popen(['lxc-is-container'], stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
- out,err = sp.communicate(None)
+ sp.communicate(None)
return(sp.returncode == 0)
except OSError as e:
if e.errno != errno.ENOENT:
@@ -507,7 +506,7 @@ def is_resolvable(name):
try:
socket.getaddrinfo(name, None)
return True
- except socket.gaierror as e:
+ except socket.gaierror:
return False
def is_resolvable_url(url):
@@ -520,7 +519,7 @@ def search_for_mirror(candidates):
try:
if is_resolvable_url(cand):
return cand
- except Exception as e:
+ except Exception:
raise
return None