mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-28 09:06:44 -06:00
Remove unused variables in automount plugin
https://fedorahosted.org/freeipa/ticket/4739 Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
parent
0576a6827e
commit
25eed1c6cb
@ -308,13 +308,9 @@ class automountlocation_tofiles(LDAPQuery):
|
|||||||
__doc__ = _('Generate automount files for a specific location.')
|
__doc__ = _('Generate automount files for a specific location.')
|
||||||
|
|
||||||
def execute(self, *args, **options):
|
def execute(self, *args, **options):
|
||||||
ldap = self.obj.backend
|
self.api.Command['automountlocation_show'](args[0])
|
||||||
|
|
||||||
location = self.api.Command['automountlocation_show'](args[0])
|
|
||||||
|
|
||||||
maps = []
|
|
||||||
result = self.api.Command['automountkey_find'](args[0], u'auto.master')
|
result = self.api.Command['automountkey_find'](args[0], u'auto.master')
|
||||||
truncated = result['truncated']
|
|
||||||
maps = result['result']
|
maps = result['result']
|
||||||
|
|
||||||
# maps, truncated
|
# maps, truncated
|
||||||
@ -328,7 +324,6 @@ class automountlocation_tofiles(LDAPQuery):
|
|||||||
mapnames.append(info)
|
mapnames.append(info)
|
||||||
key = info.split(None)
|
key = info.split(None)
|
||||||
result = self.api.Command['automountkey_find'](args[0], key[0])
|
result = self.api.Command['automountkey_find'](args[0], key[0])
|
||||||
truncated = result['truncated']
|
|
||||||
keys[info] = result['result']
|
keys[info] = result['result']
|
||||||
# TODO: handle truncated results, same as above
|
# TODO: handle truncated results, same as above
|
||||||
|
|
||||||
@ -343,7 +338,6 @@ class automountlocation_tofiles(LDAPQuery):
|
|||||||
for m in orphanmaps:
|
for m in orphanmaps:
|
||||||
key = m['automountmapname']
|
key = m['automountmapname']
|
||||||
result = self.api.Command['automountkey_find'](args[0], key[0])
|
result = self.api.Command['automountkey_find'](args[0], key[0])
|
||||||
truncated = result['truncated']
|
|
||||||
orphankeys.append(result['result'])
|
orphankeys.append(result['result'])
|
||||||
|
|
||||||
return dict(result=dict(maps=maps, keys=keys,
|
return dict(result=dict(maps=maps, keys=keys,
|
||||||
@ -463,7 +457,6 @@ class automountlocation_import(Command):
|
|||||||
mapfile = am[1].replace('"','')
|
mapfile = am[1].replace('"','')
|
||||||
am[1] = os.path.basename(am[1])
|
am[1] = os.path.basename(am[1])
|
||||||
maps[am[1]] = mapfile
|
maps[am[1]] = mapfile
|
||||||
info = ' '.join(am[1:])
|
|
||||||
|
|
||||||
# Add a new key to the auto.master map for the new map file
|
# Add a new key to the auto.master map for the new map file
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user