mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
KCC: use less verbose constructions in a few places
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>
This commit is contained in:
parent
13388e3fce
commit
ceb6ab99b5
@ -1467,9 +1467,7 @@ class Site(object):
|
||||
|
||||
:return: None if DSA doesn't exist
|
||||
"""
|
||||
if dnstr in self.dsa_table:
|
||||
return self.dsa_table[dnstr]
|
||||
return None
|
||||
return self.dsa_table.get(dnstr)
|
||||
|
||||
def select_istg(self, samdb, mydsa, ro):
|
||||
"""Determine if my DC should be an intersite topology
|
||||
|
@ -397,11 +397,8 @@ class KCC(object):
|
||||
# Get the source DSA no matter what site
|
||||
s_dsa = self.get_dsa(s_dnstr)
|
||||
|
||||
# Check if the DSA is in our site
|
||||
if self.my_site.same_site(s_dsa):
|
||||
same_site = True
|
||||
else:
|
||||
same_site = False
|
||||
#XXX should an RODC be regarded as same site
|
||||
same_site = s_dnstr in self.my_site.dsa_table
|
||||
|
||||
# Given an nTDSConnection object cn, if the DC with the
|
||||
# nTDSDSA object dc that is the parent object of cn and
|
||||
@ -550,10 +547,7 @@ class KCC(object):
|
||||
s_dnstr = s_dsa.dsa_dnstr
|
||||
update = 0x0
|
||||
|
||||
if self.my_site.same_site(s_dsa):
|
||||
same_site = True
|
||||
else:
|
||||
same_site = False
|
||||
same_site = s_dnstr in self.my_site.dsa_table
|
||||
|
||||
# if schedule doesn't match then update and modify
|
||||
times = convert_schedule_to_repltimes(cn_conn.schedule)
|
||||
|
Loading…
Reference in New Issue
Block a user