Skip to content

Commit

Permalink
fixed missing import for gssapi when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
cannatag committed Apr 23, 2015
1 parent 56ad8d3 commit 16df652
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ldap3/core/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
from ..protocol.rfc2849 import operation_to_ldif, add_ldif_header
from ..protocol.sasl.digestMd5 import sasl_digest_md5
from ..protocol.sasl.external import sasl_external
from ..protocol.sasl.kerberos import sasl_gssapi
from ..strategy.async import AsyncStrategy
from ..strategy.ldifProducer import LdifProducerStrategy
from ..strategy.sync import SyncStrategy
Expand Down Expand Up @@ -723,6 +722,7 @@ def do_sasl_bind(self,
elif self.sasl_mechanism == 'DIGEST-MD5':
result = sasl_digest_md5(self, controls)
elif self.sasl_mechanism == 'GSSAPI':
from ..protocol.sasl.kerberos import sasl_gssapi # needs the gssapi package
result = sasl_gssapi(self, controls)

self.sasl_in_progress = False
Expand Down

0 comments on commit 16df652

Please sign in to comment.