More pylint warning fixes
Change-Id: I238efda44285973a1fa2e2f6110bc9447cca5f81
diff --git a/admin.py b/admin.py
index 5f76742..a9e8d4f 100644
--- a/admin.py
+++ b/admin.py
@@ -591,20 +591,24 @@
print 'Attempting to import switch %s' % opts.auto_import_switch
if opts.auto_import_switch not in config.switches:
raise InputError("Can't find switch %s in config" % opts.auto_import_switch)
- ret = call_vland('vlan_update',
+ imp = call_vland('vlan_update',
{'command':'api.auto_import_switch',
'data':
{'switch': opts.auto_import_switch}})
- print 'VLANd imported switch %s successfully: new switch_id %d, %d new ports, %d new VLANs' % (opts.auto_import_switch, ret['switch_id'], ret['num_ports_added'], ret['num_vlans_added'])
+ print 'VLANd imped switch %s successfully: new switch_id %d, %d new ports, %d new VLANs' % (opts.auto_import_switch, imp['switch_id'], imp['num_ports_added'], imp['num_vlans_added'])
elif opts.probe_switches:
print 'Asking VLANd to probe all the configured switches'
- ret = call_vland('daemon_query',{'command':'daemon.probe_switches', 'data': None})
- for field in ret:
- print '%s: %s' % (field, ret[field])
+ probe = call_vland('daemon_query',
+ {'command':'daemon.probe_switches',
+ 'data': None})
+ for field in probe:
+ print '%s: %s' % (field, probe[field])
elif opts.shutdown:
print 'Asking VLANd to shutdown'
- ret = call_vland('daemon_query',{'command':'daemon.shutdown', 'data': None})
- for field in ret:
- print '%s: %s' % (field, ret[field])
+ shutdown = call_vland('daemon_query',
+ {'command':'daemon.shutdown',
+ 'data': None})
+ for field in shutdown:
+ print '%s: %s' % (field, shutdown[field])
else:
print 'No recognised command given. Try -h for help'