Skip to content

Commit

Permalink
Stop catching ImportError for pyasn1
Browse files Browse the repository at this point in the history
pyasn1 and pyasn1_modules are hard dependencies of python-ldap. They
have been listed in install_requires since commit
5d15857. As they are not optional, can
expect imports to succeed.
  • Loading branch information
Jon Dufresne committed Mar 30, 2018
1 parent adc40d0 commit e5492c7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 11 deletions.
5 changes: 1 addition & 4 deletions Lib/ldap/controls/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@

import ldap

try:
from pyasn1.error import PyAsn1Error
except ImportError:
PyAsn1Error = None
from pyasn1.error import PyAsn1Error


__all__ = [
Expand Down
9 changes: 2 additions & 7 deletions Lib/ldap/extop/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,5 @@ def decodeResponseValue(self,value):
return value


# Optionally import sub-modules which need pyasn1 et al
try:
import pyasn1,pyasn1_modules.rfc2251
except ImportError:
pass
else:
from ldap.extop.dds import *
# Import sub-modules
from ldap.extop.dds import *

0 comments on commit e5492c7

Please sign in to comment.