netcmd: Improve domain backup targetdir checks
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 12 Jul 2018 04:13:27 +0000 (16:13 +1200)
committerGary Lockyer <gary@samba.org>
Mon, 6 Aug 2018 03:37:42 +0000 (05:37 +0200)
commit4f532cc177cd1e95d8ccf8e69f50b315354df34c
tree8c7aadd0c00dda391e841a213245e4f4ee364caa
parent04217372f4114bd7583ba56a3860ebbe22ae0719
netcmd: Improve domain backup targetdir checks

+ Added check that specified targetdir is actually a directory (if it
exists)
+ Deleted a redundant 'Creating targetdir' check that would never be hit
+ Move code into a separate function so we can reuse it for offline
backups (which take a different set of parameters, but still have a
targetdir)

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
python/samba/netcmd/domain_backup.py