mirror of
https://github.com/samba-team/samba.git
synced 2025-12-20 16:23:51 +03:00
netcmd: Fix error-checking condition
This condition probably meant to check the argument of the most recently thrown exception, rather than the previous one again. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14669 Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
committed by
Andrew Bartlett
parent
9f1e5637bc
commit
e8c242bed1
@@ -602,11 +602,12 @@ class cmd_domain_backup_restore(cmd_fsmo_seize):
|
||||
controls=["show_deleted:0",
|
||||
"show_recycled:0"])
|
||||
except LdbError as dup_e:
|
||||
if enum != ldb.ERR_NO_SUCH_OBJECT:
|
||||
raise e
|
||||
(dup_enum, _) = dup_e.args
|
||||
if dup_enum != ldb.ERR_NO_SUCH_OBJECT:
|
||||
raise
|
||||
|
||||
if (len(dup_res) != 1):
|
||||
raise e
|
||||
raise
|
||||
|
||||
objectguid = samdb.schema_format_value("objectGUID",
|
||||
dup_res[0]["objectGUID"][0])
|
||||
|
||||
Reference in New Issue
Block a user