3f51ca
From e553b66e54af3bf981501bca57fb22caaa8e8305 Mon Sep 17 00:00:00 2001
3f51ca
From: Alexander Bokovoy <abokovoy@redhat.com>
3f51ca
Date: Thu, 9 Nov 2017 09:57:47 +0200
3f51ca
Subject: [PATCH] ipaserver/plugins/trust.py; fix some indenting issues
3f51ca
3f51ca
Reviewed-By: Christian Heimes <cheimes@redhat.com>
3f51ca
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
3f51ca
---
3f51ca
 ipaserver/plugins/trust.py | 17 +++++++++--------
3f51ca
 1 file changed, 9 insertions(+), 8 deletions(-)
3f51ca
3f51ca
diff --git a/ipaserver/plugins/trust.py b/ipaserver/plugins/trust.py
3f51ca
index ecc5fa0b22f94de05cc5282758be093f0cfca13f..d01529ee022d4a4f9b671a8f06156ed450326041 100644
3f51ca
--- a/ipaserver/plugins/trust.py
3f51ca
+++ b/ipaserver/plugins/trust.py
3f51ca
@@ -280,15 +280,17 @@ def generate_creds(trustinstance, style, **options):
3f51ca
         elif style == CRED_STYLE_KERBEROS:
3f51ca
             sp = admin_name.split('\\')
3f51ca
             if len(sp) > 1:
3f51ca
-               sp = [sp[1]]
3f51ca
+                sp = [sp[1]]
3f51ca
             else:
3f51ca
-               sp = admin_name.split(sep)
3f51ca
+                sp = admin_name.split(sep)
3f51ca
             if len(sp) == 1:
3f51ca
-                sp.append(trustinstance.remote_domain.info['dns_domain'].upper())
3f51ca
+                sp.append(trustinstance.remote_domain
3f51ca
+                          .info['dns_domain'].upper())
3f51ca
         creds = u"{name}%{password}".format(name=sep.join(sp),
3f51ca
                                             password=password)
3f51ca
     return creds
3f51ca
 
3f51ca
+
3f51ca
 def add_range(myapi, trustinstance, range_name, dom_sid, *keys, **options):
3f51ca
     """
3f51ca
     First, we try to derive the parameters of the ID range based on the
3f51ca
@@ -319,7 +321,7 @@ def add_range(myapi, trustinstance, range_name, dom_sid, *keys, **options):
3f51ca
         # CN=ypservers,CN=ypServ30,CN=RpcServices,CN=System
3f51ca
         info_filter = '(objectClass=msSFU30DomainInfo)'
3f51ca
         info_dn = DN('CN=ypservers,CN=ypServ30,CN=RpcServices,CN=System')\
3f51ca
-                  + basedn
3f51ca
+            + basedn
3f51ca
 
3f51ca
         # Get the domain validator
3f51ca
         domain_validator = ipaserver.dcerpc.DomainValidator(myapi)
3f51ca
@@ -367,7 +369,7 @@ def add_range(myapi, trustinstance, range_name, dom_sid, *keys, **options):
3f51ca
 
3f51ca
                 base_id = int(info.get('msSFU30OrderNumber')[0])
3f51ca
                 range_size = (1 + (max_id - base_id) // DEFAULT_RANGE_SIZE)\
3f51ca
-                             * DEFAULT_RANGE_SIZE
3f51ca
+                    * DEFAULT_RANGE_SIZE
3f51ca
 
3f51ca
     # Second, options given via the CLI options take precedence to discovery
3f51ca
     if options.get('range_type', None):
3f51ca
@@ -595,11 +597,10 @@ class trust(LDAPObject):
3f51ca
             pass
3f51ca
         else:
3f51ca
             for entry in entries:
3f51ca
-                 add_message(
3f51ca
+                add_message(
3f51ca
                     options['version'],
3f51ca
                     result,
3f51ca
-                    BrokenTrust(domain=entry.single_value['cn'])
3f51ca
-                 )
3f51ca
+                    BrokenTrust(domain=entry.single_value['cn']))
3f51ca
 
3f51ca
 
3f51ca
 @register()
3f51ca
-- 
3f51ca
2.13.6
3f51ca