1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-31 20:22:15 +03:00

python: wrap 'import dckeytab' in an explanatory function

The samba.dckeytab module has magic effects on samba.net, but never
appears to be used. That can be confusing, both to people and to
linters. Here we wrap that confusion up into a well-commented
function, so we never again have to wonder why the unused import is
there.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: David Mulder <dmulder@samba.org>
This commit is contained in:
Douglas Bagnall
2020-07-04 16:20:47 +12:00
committed by Andreas Schneider
parent 98f6ece5ad
commit 914226bf52
3 changed files with 24 additions and 2 deletions

View File

@ -40,6 +40,7 @@ from samba import NTSTATUSError
from samba import werror
from getpass import getpass
from samba.net import Net, LIBNET_JOIN_AUTOMATIC
from samba import enable_net_export_keytab
import samba.ntacls
from samba.join import join_RODC, join_DC
from samba.auth import system_session
@ -162,7 +163,7 @@ def get_testparm_var(testparm, smbconf, varname):
try:
import samba.dckeytab
enable_net_export_keytab()
except ImportError:
cmd_domain_export_keytab = None
else: