summaryrefslogtreecommitdiff
path: root/cloudinit/netinfo.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/netinfo.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/netinfo.py')
-rw-r--r--cloudinit/netinfo.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/cloudinit/netinfo.py b/cloudinit/netinfo.py
index a6b32c4f..9ca72b77 100644
--- a/cloudinit/netinfo.py
+++ b/cloudinit/netinfo.py
@@ -24,7 +24,7 @@ def netdev_info():
if toks[i] == "hwaddr":
try:
devs[curdev]["hwaddr"] = toks[i+1]
- except IndexError as e:
+ except IndexError:
pass
for field in ("addr", "bcast", "mask"):
target = "%s%s" % (field, fieldpost)
@@ -33,7 +33,7 @@ def netdev_info():
if toks[i] == "%s:" % field:
try:
devs[curdev][target] = toks[i+1]
- except IndexError as e:
+ except IndexError:
pass
elif toks[i].startswith("%s:" % field):
devs[curdev][target] = toks[i][len(field)+1:]
@@ -61,7 +61,7 @@ def debug_info(pre="ci-info: "):
lines = [ ]
try:
netdev = netdev_info()
- except Exception as e:
+ except Exception:
lines.append("netdev_info failed!")
netdev = {}
for (dev, d) in netdev.iteritems():
@@ -69,7 +69,7 @@ def debug_info(pre="ci-info: "):
(pre, dev, d["up"], d["addr"],d["mask"], d["hwaddr"]))
try:
routes = route_info()
- except Exception as e:
+ except Exception:
lines.append("route_info failed")
routes = []
n = 0