KCC: slight rewrite for the sake of pep8
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Wed, 1 Apr 2015 02:29:14 +0000 (15:29 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 29 May 2015 09:08:21 +0000 (11:08 +0200)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/kcc_utils.py

index 7d5f42942756c1321b767cee2542ea5b9ea1344a..b91bbeec8cc47fe2f45a9b6fc099cb84bca49c1e 100644 (file)
@@ -1311,18 +1311,16 @@ class Partition(NamingContext):
 
         :param target_dsa: should NC be present on target dsa
         """
-        needed = False
         ro = False
         partial = False
 
         # If this is the config, schema, or default
         # domain NC for the target dsa then it should
         # be present
-        if self.nc_type == NCType.config or \
-           self.nc_type == NCType.schema or \
-           (self.nc_type == NCType.domain and
-            self.nc_dnstr == target_dsa.default_dnstr):
-            needed = True
+        needed = (self.nc_type == NCType.config or
+                  self.nc_type == NCType.schema or
+                  (self.nc_type == NCType.domain and
+                   self.nc_dnstr == target_dsa.default_dnstr))
 
         # A writable replica of an application NC should be present
         # if there a cross reference to the target DSA exists.  Depending