summaryrefslogtreecommitdiffstats
path: root/ipaclient/plugins
diff options
context:
space:
mode:
authorMartin Basti <mbasti@redhat.com>2016-09-26 14:08:17 +0200
committerMartin Basti <mbasti@redhat.com>2016-09-27 13:35:58 +0200
commit0f88f8fe889ae4801fc8d5ece1ad51c5246718ac (patch)
tree4f38fb6210abaa9f354353df2abda96d1b8fb612 /ipaclient/plugins
parent452b08754d02b89c0e3117b83d9156e6110943c9 (diff)
Remove unused variables in the code
This commit removes unused variables or rename variables as "expected to be unused" by using "_" prefix. This covers only cases where fix was easy or only one unused variable was in a module Reviewed-By: Florence Blanc-Renaud <frenaud@redhat.com> Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
Diffstat (limited to 'ipaclient/plugins')
-rw-r--r--ipaclient/plugins/automount.py6
-rw-r--r--ipaclient/plugins/location.py2
-rw-r--r--ipaclient/plugins/vault.py6
3 files changed, 4 insertions, 10 deletions
diff --git a/ipaclient/plugins/automount.py b/ipaclient/plugins/automount.py
index 3742705fa..540bd5910 100644
--- a/ipaclient/plugins/automount.py
+++ b/ipaclient/plugins/automount.py
@@ -152,7 +152,7 @@ class automountlocation_import(Command):
The basic idea is to read the master file and create all the maps
we need, then read each map file and add all the keys for the map.
"""
- location = self.api.Command['automountlocation_show'](args[0])
+ self.api.Command['automountlocation_show'](args[0])
result = {'maps':[], 'keys':[], 'skipped':[], 'duplicatekeys':[], 'duplicatemaps':[]}
maps = {}
@@ -183,7 +183,7 @@ class automountlocation_import(Command):
automountkey=unicode(am[0]),
automountinformation=unicode(' '.join(am[1:])))
result['keys'].append([am[0], u'auto.master'])
- except errors.DuplicateEntry as e:
+ except errors.DuplicateEntry:
if unicode(am[0]) in DEFAULT_KEYS:
# ignore conflict when the key was pre-created by the framework
pass
@@ -198,7 +198,7 @@ class automountlocation_import(Command):
try:
api.Command['automountmap_add'](args[0], unicode(am[1]))
result['maps'].append(am[1])
- except errors.DuplicateEntry as e:
+ except errors.DuplicateEntry:
if unicode(am[1]) in DEFAULT_MAPS:
# ignore conflict when the map was pre-created by the framework
pass
diff --git a/ipaclient/plugins/location.py b/ipaclient/plugins/location.py
index e5191e78f..3f649e01c 100644
--- a/ipaclient/plugins/location.py
+++ b/ipaclient/plugins/location.py
@@ -18,7 +18,7 @@ class location_show(MethodOverride):
servers = output.get('servers', {})
first = True
- for hostname, details in servers.items():
+ for details in servers.values():
if first:
textui.print_indented(_("Servers details:"), indent=1)
first = False
diff --git a/ipaclient/plugins/vault.py b/ipaclient/plugins/vault.py
index 08bbeb50f..b8b4f2916 100644
--- a/ipaclient/plugins/vault.py
+++ b/ipaclient/plugins/vault.py
@@ -629,9 +629,6 @@ class vault_archive(Local):
return self.api.Command.vault_archive_internal.output()
def forward(self, *args, **options):
-
- name = args[-1]
-
data = options.get('data')
input_file = options.get('in')
@@ -883,9 +880,6 @@ class vault_retrieve(Local):
return self.api.Command.vault_retrieve_internal.output()
def forward(self, *args, **options):
-
- name = args[-1]
-
output_file = options.get('out')
password = options.get('password')