1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

netcmd: Delete unnecessary function

Minor code cleanup. The last 2 patches gutted this function, to the
point where there's no longer any value in keeping it.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13566

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
This commit is contained in:
Tim Beale 2018-08-09 15:35:59 +12:00 committed by Andrew Bartlett
parent 8fb706c346
commit d2d0395151

View File

@ -156,14 +156,6 @@ def check_targetdir(logger, targetdir):
raise CommandError("%s is not a directory" % targetdir)
def check_online_backup_args(logger, creds, server, targetdir):
# Make sure we have all the required args.
if server is None:
raise CommandError('Server required')
check_targetdir(logger, targetdir)
# For '--no-secrets' backups, this sets the Administrator user's password to a
# randomly-generated value. This is similar to the provision behaviour
def set_admin_password(logger, samdb, username):
@ -218,7 +210,10 @@ class cmd_domain_backup_online(samba.netcmd.Command):
creds = credopts.get_credentials(lp)
# Make sure we have all the required args.
check_online_backup_args(logger, creds, server, targetdir)
if server is None:
raise CommandError('Server required')
check_targetdir(logger, targetdir)
tmpdir = tempfile.mkdtemp(dir=targetdir)
@ -686,7 +681,11 @@ class cmd_domain_backup_rename(samba.netcmd.Command):
creds = credopts.get_credentials(lp)
# Make sure we have all the required args.
check_online_backup_args(logger, creds, server, targetdir)
if server is None:
raise CommandError('Server required')
check_targetdir(logger, targetdir)
delete_old_dns = not keep_dns_realm
new_dns_realm = new_dns_realm.lower()