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

samba.netcmd.domain: Just catch ImportError, not any parsing errors in cmd_domain_export_keytab.

Change-Id: If5710565c74e87fe218a83f31cddcf64605e522e
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
This commit is contained in:
Jelmer Vernooij 2014-08-30 01:57:26 +02:00 committed by David Disseldorp
parent 2440845ace
commit fdbd6efa13

View File

@ -83,6 +83,9 @@ def get_testparm_var(testparm, smbconf, varname):
try:
import samba.dckeytab
except ImportError:
cmd_domain_export_keytab = None
else:
class cmd_domain_export_keytab(Command):
"""Dump Kerberos keys of the domain into a keytab."""
@ -104,8 +107,6 @@ try:
lp = sambaopts.get_loadparm()
net = Net(None, lp)
net.export_keytab(keytab=keytab, principal=principal)
except:
cmd_domain_export_keytab = None
class cmd_domain_info(Command):