Skip to content

Commit

Permalink
fixed ldap.dn.is_dn()
Browse files Browse the repository at this point in the history
  • Loading branch information
stroeder committed Jul 24, 2016
1 parent 3fb192f commit a2e29cf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lib/ldap/dn.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
See http://www.python-ldap.org/ for details.
\$Id: dn.py,v 1.13 2015/06/06 09:21:37 stroeder Exp $
\$Id: dn.py,v 1.14 2016/07/24 15:42:17 stroeder Exp $
Compability:
- Tested with Python 2.0+
Expand Down Expand Up @@ -116,8 +116,8 @@ def is_dn(s):
distinguished host_name (DN), otherwise False is returned.
"""
try:
dn2str(s)
except Exception:
str2dn(s)
except Exception, err:
return False
else:
return True

0 comments on commit a2e29cf

Please sign in to comment.