Remove remaining instance of pep8 E211 (too many spaces before operator).
authorJelmer Vernooń≥ <jelmer@samba.org>
Sun, 1 Jun 2014 23:33:43 +0000 (01:33 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 14 Oct 2014 04:44:06 +0000 (06:44 +0200)
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Change-Id: I9af3bf582bba8fc1094addb12cd0a5ce04406b5b

python/samba/drs_utils.py
python/samba/provision/backend.py
python/samba/schema.py
python/samba/tests/samba3.py
selftest/selftesthelpers.py
source4/scripting/bin/samba_kcc

index 49837492b7dcc6c19f2f5adf0f348079072ff6c0..38accdd6ab0bf0009c969ec7cc9a97ccd741af99 100644 (file)
@@ -203,24 +203,24 @@ class drs_Replicate(object):
         # setup for a GetNCChanges call
         req8 = drsuapi.DsGetNCChangesRequest8()
 
-        req8.destination_dsa_guid           = destination_dsa_guid
-        req8.source_dsa_invocation_id       = source_dsa_invocation_id
-        req8.naming_context                 = drsuapi.DsReplicaObjectIdentifier()
-        req8.naming_context.dn              = dn
-        req8.highwatermark                  = drsuapi.DsReplicaHighWaterMark()
-        req8.highwatermark.tmp_highest_usn  = 0
-        req8.highwatermark.reserved_usn     = 0
-        req8.highwatermark.highest_usn      = 0
-        req8.uptodateness_vector            = None
+        req8.destination_dsa_guid = destination_dsa_guid
+        req8.source_dsa_invocation_id = source_dsa_invocation_id
+        req8.naming_context = drsuapi.DsReplicaObjectIdentifier()
+        req8.naming_context.dn = dn
+        req8.highwatermark = drsuapi.DsReplicaHighWaterMark()
+        req8.highwatermark.tmp_highest_usn = 0
+        req8.highwatermark.reserved_usn = 0
+        req8.highwatermark.highest_usn = 0
+        req8.uptodateness_vector = None
         if replica_flags is not None:
             req8.replica_flags = replica_flags
         elif exop == drsuapi.DRSUAPI_EXOP_REPL_SECRET:
-            req8.replica_flags              = 0
+            req8.replica_flags = 0
         else:
-            req8.replica_flags              = (drsuapi.DRSUAPI_DRS_INIT_SYNC |
-                                               drsuapi.DRSUAPI_DRS_PER_SYNC |
-                                               drsuapi.DRSUAPI_DRS_GET_ANC |
-                                               drsuapi.DRSUAPI_DRS_NEVER_SYNCED)
+            req8.replica_flags = (drsuapi.DRSUAPI_DRS_INIT_SYNC |
+                                  drsuapi.DRSUAPI_DRS_PER_SYNC |
+                                  drsuapi.DRSUAPI_DRS_GET_ANC |
+                                  drsuapi.DRSUAPI_DRS_NEVER_SYNCED)
             if rodc:
                 req8.replica_flags |= drsuapi.DRSUAPI_DRS_SPECIAL_SECRET_PROCESSING
             else:
index dbea3ead83fe0462554ded180a9884d21395f871..cffdea7218ed7652095b63ac1c00192ea1833c0d 100644 (file)
@@ -377,7 +377,7 @@ class OpenLDAPBackend(LDAPBackend):
         attrs = ["linkID", "lDAPDisplayName"]
         res = self.schema.ldb.search(expression="(&(objectclass=attributeSchema)(searchFlags:1.2.840.113556.1.4.803:=1))", base=self.names.schemadn, scope=SCOPE_ONELEVEL, attrs=attrs)
         index_config = ""
-        for i in range (0, len(res)):
+        for i in range(0, len(res)):
             index_attr = res[i]["lDAPDisplayName"][0]
             if index_attr == "objectGUID":
                 index_attr = "entryUUID"
@@ -736,7 +736,7 @@ class FDSBackend(LDAPBackend):
         attrs = ["lDAPDisplayName"]
         res = self.schema.ldb.search(expression="(&(objectclass=attributeSchema)(searchFlags:1.2.840.113556.1.4.803:=1))", base=self.names.schemadn, scope=SCOPE_ONELEVEL, attrs=attrs)
 
-        for i in range (0, len(res)):
+        for i in range(0, len(res)):
             attr = res[i]["lDAPDisplayName"][0]
 
             if attr == "objectGUID":
index 5c8f506f26e757ab542cd7bbf42e601a3ddfa5fa..4e6381306caee8cef04e5f2cac82aa29d2d40e8e 100644 (file)
@@ -160,7 +160,7 @@ def get_linked_attributes(schemadn,schemaldb):
     attrs = ["linkID", "lDAPDisplayName"]
     res = schemaldb.search(expression="(&(linkID=*)(!(linkID:1.2.840.113556.1.4.803:=1))(objectclass=attributeSchema)(attributeSyntax=2.5.5.1))", base=schemadn, scope=SCOPE_ONELEVEL, attrs=attrs)
     attributes = {}
-    for i in range (0, len(res)):
+    for i in range(0, len(res)):
         expression = "(&(objectclass=attributeSchema)(linkID=%d)(attributeSyntax=2.5.5.1))" % (int(res[i]["linkID"][0])+1)
         target = schemaldb.searchone(basedn=schemadn,
                                      expression=expression,
@@ -178,7 +178,7 @@ def get_dnsyntax_attributes(schemadn,schemaldb):
         base=schemadn, scope=SCOPE_ONELEVEL,
         attrs=["linkID", "lDAPDisplayName"])
     attributes = []
-    for i in range (0, len(res)):
+    for i in range(0, len(res)):
         attributes.append(str(res[i]["lDAPDisplayName"]))
     return attributes
 
index 51d76dd94c077ced86d9f5c6498500f6b4ff4d56..f449c64142a16923336dddc2389ca0a61c56713f 100644 (file)
@@ -63,7 +63,7 @@ class RegistryTestCase(TestCase):
 class PassdbTestCase(TestCaseInTempDir):
 
     def setUp(self):
-        super (PassdbTestCase, self).setUp()
+        super(PassdbTestCase, self).setUp()
         os.system("cp -r %s %s" % (DATADIR, self.tempdir))
         datadir = os.path.join(self.tempdir, "samba3")
 
index 40e38aab8b1558c9d69ad7cab9c951d7d6fc52d5..0e2033bd2e3a0d0150aa4e49f5fb78590982ef8d 100644 (file)
@@ -18,7 +18,6 @@
 # three separated by newlines. All other lines in the output are considered
 # comments.
 
-import errno
 import os
 import subprocess
 import sys
index 617cad26cb0ea03d4e8c3ad62fe33822e51f1087..9d26848d2d05785b9ae8282a5e90759be716abeb 100755 (executable)
@@ -655,8 +655,8 @@ class KCC(object):
                     res = self.samdb.search(base=pdnstr, scope=ldb.SCOPE_BASE,
                                             attrs=attrs)
                 except ldb.ldbError, (enum, estr):
-                    raise Exception \
-                        ("Unable to find attr (%s) for (%s) - (%s)" %
+                    raise Exception(
+                        "Unable to find attr (%s) for (%s) - (%s)" %
                          (x_transport.address_attr, pdnstr, estr))
 
                 msg = res[0]