Blob Blame History Raw
From e553b66e54af3bf981501bca57fb22caaa8e8305 Mon Sep 17 00:00:00 2001
From: Alexander Bokovoy <abokovoy@redhat.com>
Date: Thu, 9 Nov 2017 09:57:47 +0200
Subject: [PATCH] ipaserver/plugins/trust.py; fix some indenting issues

Reviewed-By: Christian Heimes <cheimes@redhat.com>
Reviewed-By: Thierry Bordaz <tbordaz@redhat.com>
---
 ipaserver/plugins/trust.py | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/ipaserver/plugins/trust.py b/ipaserver/plugins/trust.py
index ecc5fa0b22f94de05cc5282758be093f0cfca13f..d01529ee022d4a4f9b671a8f06156ed450326041 100644
--- a/ipaserver/plugins/trust.py
+++ b/ipaserver/plugins/trust.py
@@ -280,15 +280,17 @@ def generate_creds(trustinstance, style, **options):
         elif style == CRED_STYLE_KERBEROS:
             sp = admin_name.split('\\')
             if len(sp) > 1:
-               sp = [sp[1]]
+                sp = [sp[1]]
             else:
-               sp = admin_name.split(sep)
+                sp = admin_name.split(sep)
             if len(sp) == 1:
-                sp.append(trustinstance.remote_domain.info['dns_domain'].upper())
+                sp.append(trustinstance.remote_domain
+                          .info['dns_domain'].upper())
         creds = u"{name}%{password}".format(name=sep.join(sp),
                                             password=password)
     return creds
 
+
 def add_range(myapi, trustinstance, range_name, dom_sid, *keys, **options):
     """
     First, we try to derive the parameters of the ID range based on the
@@ -319,7 +321,7 @@ def add_range(myapi, trustinstance, range_name, dom_sid, *keys, **options):
         # CN=ypservers,CN=ypServ30,CN=RpcServices,CN=System
         info_filter = '(objectClass=msSFU30DomainInfo)'
         info_dn = DN('CN=ypservers,CN=ypServ30,CN=RpcServices,CN=System')\
-                  + basedn
+            + basedn
 
         # Get the domain validator
         domain_validator = ipaserver.dcerpc.DomainValidator(myapi)
@@ -367,7 +369,7 @@ def add_range(myapi, trustinstance, range_name, dom_sid, *keys, **options):
 
                 base_id = int(info.get('msSFU30OrderNumber')[0])
                 range_size = (1 + (max_id - base_id) // DEFAULT_RANGE_SIZE)\
-                             * DEFAULT_RANGE_SIZE
+                    * DEFAULT_RANGE_SIZE
 
     # Second, options given via the CLI options take precedence to discovery
     if options.get('range_type', None):
@@ -595,11 +597,10 @@ class trust(LDAPObject):
             pass
         else:
             for entry in entries:
-                 add_message(
+                add_message(
                     options['version'],
                     result,
-                    BrokenTrust(domain=entry.single_value['cn'])
-                 )
+                    BrokenTrust(domain=entry.single_value['cn']))
 
 
 @register()
-- 
2.13.6