1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

samba_kcc: Fix existing syntax errors preventing samba_kcc from running

Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Garming Sam 2015-01-23 09:43:55 +13:00 committed by Andrew Bartlett
parent 204fe65be2
commit d486e4ce6f
2 changed files with 8 additions and 8 deletions

View File

@ -73,7 +73,7 @@ class NamingContext(object):
scope=ldb.SCOPE_BASE, attrs=attrs)
except ldb.LdbError, (enum, estr):
raise Exception("Unable to find naming context (%s)" %
raise Exception("Unable to find naming context (%s) - (%s)" %
(self.nc_dnstr, estr))
msg = res[0]
if "objectGUID" in msg:
@ -375,7 +375,7 @@ class NCReplica(NamingContext):
except ldb.LdbError, estr:
raise Exception("Could not set repsFrom for (%s) - (%s)" %
(self.dsa_dnstr, estr))
(self.nc_dnstr, estr))
def dumpstr_to_be_deleted(self):
text=""
@ -906,7 +906,7 @@ class NTDSConnection(object):
self.load_connection_transport(samdb, str(dsdn.dn))
if "schedule" in msg:
self.schedule = ndr_unpack(drsblobs.replSchedule, msg["schedule"][0])
self.schedule = ndr_unpack(drsblobs.schedule, msg["schedule"][0])
if "whenCreated" in msg:
self.whenCreated = ldb.string_to_time(msg["whenCreated"][0])
@ -928,7 +928,7 @@ class NTDSConnection(object):
scope=ldb.SCOPE_BASE, attrs=attrs)
except ldb.LdbError, (enum, estr):
raise Exception("Unable to find transport (%s)" %
raise Exception("Unable to find transport (%s) - (%s)" %
(tdnstr, estr))
if "objectGUID" in res[0]:
@ -1783,7 +1783,7 @@ class GraphNode(object):
flags = dsdb.SYSTEM_FLAG_CONFIG_ALLOW_RENAME + \
dsdb.SYSTEM_FLAG_CONFIG_ALLOW_MOVE
dsa.create_connection(opt, flags, None, edge_dnstr, None)
dsa.new_connection(opt, flags, None, edge_dnstr, None)
def has_sufficient_edges(self):
'''Return True if we have met the maximum "from edges" criteria'''

View File

@ -654,7 +654,7 @@ class KCC(object):
res = self.samdb.search(base=pdnstr, scope=ldb.SCOPE_BASE,
attrs=attrs)
except ldb.ldbError, (enum, estr):
except ldb.LdbError, (enum, estr):
raise Exception(
"Unable to find attr (%s) for (%s) - (%s)" %
(x_transport.address_attr, pdnstr, estr))
@ -1027,7 +1027,7 @@ class KCC(object):
res = self.samdb.search(base=pdnstr, scope=ldb.SCOPE_BASE,
attrs=attrs)
except ldb.ldbError, (enum, estr):
except ldb.LdbError, (enum, estr):
continue
msg = res[0]
@ -1272,7 +1272,7 @@ class KCC(object):
# NTDSCONN_OPT_USE_NOTIFY in opt
if (link_opt & dsdb.NTDSSITELINK_OPT_USE_NOTIFY) != 0:
opt |= (dsdb.NTDSCONN_OPT_OVERRIDE_NOTIFY_DEFAULT |
dsdb.NTDSCONN_USE_NOTIFY)
dsdb.NTDSCONN_OPT_USE_NOTIFY)
# IF bit NTDSSITELINK_OPT_TWOWAY_SYNC is set in ri.Options
# SET bit NTDSCONN_OPT_TWOWAY_SYNC opt