summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorTim Beale <timbeale@catalyst.net.nz>2018-08-09 15:35:59 +1200
committerKarolin Seeger <kseeger@samba.org>2018-08-23 10:39:15 +0200
commitb9315fa19eb6d422b12258aef65cfecd7806d517 (patch)
tree74c65c920b00cd27a7bfddd4a815078e06cca240 /python
parent15e1a41130281ff32e727e2aafef37cfc7816e5a (diff)
downloadsamba-b9315fa19eb6d422b12258aef65cfecd7806d517.tar.gz
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> (cherry picked from commit d2d039515119523192676b311d5997afd34f4c90)
Diffstat (limited to 'python')
-rw-r--r--python/samba/netcmd/domain_backup.py19
1 files changed, 9 insertions, 10 deletions
diff --git a/python/samba/netcmd/domain_backup.py b/python/samba/netcmd/domain_backup.py
index b2c830259fc..8e82cd72146 100644
--- a/python/samba/netcmd/domain_backup.py
+++ b/python/samba/netcmd/domain_backup.py
@@ -150,14 +150,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):
@@ -212,7 +204,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)
@@ -680,7 +675,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()