Re: [Freeipa-devel] [PATCH 0484] remove unused code from automount plugin

2016-05-26 Thread Martin Basti



On 26.05.2016 08:13, Stanislav Laznicka wrote:

On 05/25/2016 06:21 PM, Martin Basti wrote:


On 25.05.2016 09:11, Stanislav Laznicka wrote:


LGTM, could you please just add the ticket to the commit message?


On 05/20/2016 04:28 PM, Martin Basti wrote:




On 20.05.2016 15:03, Martin Basti wrote:

The removed code is unused for long time.

Patch attached.




https://fedorahosted.org/freeipa/attachment/ticket/5899/





updated patch attached.

ACK

Pushed to master: 25eed1c6cb1808dfa05ce7be23aa7dea4ae0f466

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [PATCH 0484] remove unused code from automount plugin

2016-05-25 Thread Stanislav Laznicka

On 05/25/2016 06:21 PM, Martin Basti wrote:


On 25.05.2016 09:11, Stanislav Laznicka wrote:


LGTM, could you please just add the ticket to the commit message?


On 05/20/2016 04:28 PM, Martin Basti wrote:




On 20.05.2016 15:03, Martin Basti wrote:

The removed code is unused for long time.

Patch attached.




https://fedorahosted.org/freeipa/attachment/ticket/5899/





updated patch attached.

ACK
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [PATCH 0484] remove unused code from automount plugin

2016-05-25 Thread Martin Basti



On 25.05.2016 09:11, Stanislav Laznicka wrote:


LGTM, could you please just add the ticket to the commit message?


On 05/20/2016 04:28 PM, Martin Basti wrote:




On 20.05.2016 15:03, Martin Basti wrote:

The removed code is unused for long time.

Patch attached.




https://fedorahosted.org/freeipa/attachment/ticket/5899/





updated patch attached.
From 7c29292f7fde89a046d17e166a1a64b598b54458 Mon Sep 17 00:00:00 2001
From: Martin Basti 
Date: Thu, 19 May 2016 10:24:43 +0200
Subject: [PATCH] Remove unused variables in automount plugin

https://fedorahosted.org/freeipa/ticket/4739
---
 ipalib/plugins/automount.py | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py
index 85d7d13212de59cb5cb8d57583d2c3c9d4f2b71c..f5128572b7d1e3f21a4359bbbe0ad3081be5f863 100644
--- a/ipalib/plugins/automount.py
+++ b/ipalib/plugins/automount.py
@@ -308,13 +308,9 @@ class automountlocation_tofiles(LDAPQuery):
 __doc__ = _('Generate automount files for a specific location.')
 
 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')
-truncated = result['truncated']
 maps = result['result']
 
 # maps, truncated
@@ -328,7 +324,6 @@ class automountlocation_tofiles(LDAPQuery):
 mapnames.append(info)
 key = info.split(None)
 result = self.api.Command['automountkey_find'](args[0], key[0])
-truncated = result['truncated']
 keys[info] = result['result']
 # TODO: handle truncated results, same as above
 
@@ -343,7 +338,6 @@ class automountlocation_tofiles(LDAPQuery):
 for m in orphanmaps:
 key = m['automountmapname']
 result = self.api.Command['automountkey_find'](args[0], key[0])
-truncated = result['truncated']
 orphankeys.append(result['result'])
 
 return dict(result=dict(maps=maps, keys=keys,
@@ -463,7 +457,6 @@ class automountlocation_import(Command):
 mapfile = am[1].replace('"','')
 am[1] = os.path.basename(am[1])
 maps[am[1]] = mapfile
-info = ' '.join(am[1:])
 
 # Add a new key to the auto.master map for the new map file
 try:
-- 
2.5.5

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [PATCH 0484] remove unused code from automount plugin

2016-05-25 Thread Stanislav Laznicka

LGTM, could you please just add the ticket to the commit message?


On 05/20/2016 04:28 PM, Martin Basti wrote:




On 20.05.2016 15:03, Martin Basti wrote:

The removed code is unused for long time.

Patch attached.




https://fedorahosted.org/freeipa/attachment/ticket/5899/




-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

Re: [Freeipa-devel] [PATCH 0484] remove unused code from automount plugin

2016-05-20 Thread Martin Basti



On 20.05.2016 15:03, Martin Basti wrote:

The removed code is unused for long time.

Patch attached.




https://fedorahosted.org/freeipa/attachment/ticket/5899/
-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code

[Freeipa-devel] [PATCH 0484] remove unused code from automount plugin

2016-05-20 Thread Martin Basti

The removed code is unused for long time.

Patch attached.

From 074ffe14fb271ca32421021fb8a40f3d9fb7bc83 Mon Sep 17 00:00:00 2001
From: Martin Basti 
Date: Thu, 19 May 2016 10:24:43 +0200
Subject: [PATCH] Remove unused variables in automount plugin

---
 ipalib/plugins/automount.py | 9 +
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/ipalib/plugins/automount.py b/ipalib/plugins/automount.py
index c0a55d5dabec72ace99ab178ff3dec7b15ede744..3eb904840d86027ca194db856fa21bf03451e99d 100644
--- a/ipalib/plugins/automount.py
+++ b/ipalib/plugins/automount.py
@@ -307,13 +307,9 @@ class automountlocation_tofiles(LDAPQuery):
 __doc__ = _('Generate automount files for a specific location.')
 
 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')
-truncated = result['truncated']
 maps = result['result']
 
 # maps, truncated
@@ -327,7 +323,6 @@ class automountlocation_tofiles(LDAPQuery):
 mapnames.append(info)
 key = info.split(None)
 result = self.api.Command['automountkey_find'](args[0], key[0])
-truncated = result['truncated']
 keys[info] = result['result']
 # TODO: handle truncated results, same as above
 
@@ -342,7 +337,6 @@ class automountlocation_tofiles(LDAPQuery):
 for m in orphanmaps:
 key = m['automountmapname']
 result = self.api.Command['automountkey_find'](args[0], key[0])
-truncated = result['truncated']
 orphankeys.append(result['result'])
 
 return dict(result=dict(maps=maps, keys=keys,
@@ -456,7 +450,6 @@ class automountlocation_import(LDAPQuery):
 mapfile = am[1].replace('"','')
 am[1] = os.path.basename(am[1])
 maps[am[1]] = mapfile
-info = ' '.join(am[1:])
 
 # Add a new key to the auto.master map for the new map file
 try:
-- 
2.5.5

-- 
Manage your subscription for the Freeipa-devel mailing list:
https://www.redhat.com/mailman/listinfo/freeipa-devel
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code