summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-08-27 12:08:49 +1000
committerAndrew Tridgell <tridge@samba.org>2010-09-02 13:37:07 +1000
commit9f5dcb2235b42177bc325a48930917b5d68308e4 (patch)
treecf303e670757c36c674a3283317bbc996929ba55 /source4/scripting/python
parent768475d5716faaf3e730404d44d68f7a3250d861 (diff)
downloadsamba-9f5dcb2235b42177bc325a48930917b5d68308e4.tar.gz
samba-9f5dcb2235b42177bc325a48930917b5d68308e4.tar.bz2
samba-9f5dcb2235b42177bc325a48930917b5d68308e4.zip
s4-net: use CommandError() in net rodc
this integrates better with the net command Pair-Programmed-With: Jelmer Vernooij <jelmer@samba.org>
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/netcmd/rodc.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/scripting/python/samba/netcmd/rodc.py b/source4/scripting/python/samba/netcmd/rodc.py
index 8e3ebbf66d..0fdb252b60 100644
--- a/source4/scripting/python/samba/netcmd/rodc.py
+++ b/source4/scripting/python/samba/netcmd/rodc.py
@@ -104,18 +104,18 @@ class cmd_rodc_preload(Command):
local_samdb.transaction_start()
repl = drs_Replicate("ncacn_ip_tcp:%s[seal,print]" % server, lp, creds, local_samdb)
try:
- repl.replicate(dn, source_dsa_invocation_id, destination_dsa_guid, exop=drsuapi.DRSUAPI_EXOP_REPL_SECRET)
+ repl.replicate(dn, source_dsa_invocation_id, destination_dsa_guid,
+ exop=drsuapi.DRSUAPI_EXOP_REPL_SECRET)
except RuntimeError, (ecode, estring):
if estring == 'WERR_DS_DRA_ACCESS_DENIED':
- print "Access denied replicating DN %s" % dn
local_samdb.transaction_cancel()
- # how do we fail a net command??
- return False
+ raise CommandError("Access denied replicating DN %s" % dn)
else:
raise
local_samdb.transaction_commit()
+
class cmd_rodc(SuperCommand):
"""RODC commands"""