On 11/01/2016 09:42 AM, Alexander Bokovoy wrote:
On ti, 01 marras 2016, Martin Babinsky wrote:
On 10/31/2016 05:23 PM, Alexander Bokovoy wrote:
See description. This is a regression since FreeIPA 4.4.0.
Please link upstream ticket to the commit message, not BZ.
I have put on my Travis hat and found:
1.) pep8 error:
./ipaserver/plugins/trust.py:1623:25: E128 continuation line
under-indented for visual indent
I know that this is a piece of code that was only moved around but it
should conform to pep8 anyway.
2.) unused variable:
Pylint is running, please wait ...
************* Module ipaserver.plugins.trust
trustdomain_del.execute] Unused variable 'entry')
Makefile:130: recipe for target 'pylint' failed
make: *** [pylint] Error 1
Also, if you just want to check if the domain exists, I think that you
can use `get_dn_if_exists` method of LDAPObject (you will get rid of
unused variable as a bonus):
diff --git a/ipaserver/plugins/trust.py b/ipaserver/plugins/trust.py
index 3540742..2cd4722 100644
@@ -1615,8 +1615,7 @@ class trustdomain_del(LDAPDelete):
for domain in keys:
- dn = self.obj.get_dn(keys, domain, trust_type=u'ad')
- entry = ldap.get_entry(dn)
+ self.obj.get_dn_if_exists(keys, domain,
if keys.lower() == domain:
Thanks, I've fixed these issues.
Updated patch is attached.
Pushed to master: e8b94ef352400f9045837ed69266686b6b117301
rebased and pushed to ipa-4-4: bd74150aa28f92b0980f5a803d3591a118628e8f
Manage your subscription for the Freeipa-devel mailing list:
Contribute to FreeIPA: http://www.freeipa.org/page/Contribute/Code