From 4de6216d731d65b9a971dd634a43115052700c15 Mon Sep 17 00:00:00 2001 From: stroeder Date: Sun, 17 Jul 2016 19:44:19 +0000 Subject: [PATCH] cosmetic change: use constants in SEARCH_SCOPE_STR dict --- Lib/ldapurl.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Lib/ldapurl.py b/Lib/ldapurl.py index 49792e4..b9e78a8 100644 --- a/Lib/ldapurl.py +++ b/Lib/ldapurl.py @@ -3,7 +3,7 @@ See http://www.python-ldap.org/ for details. -\$Id: ldapurl.py,v 1.78 2016/01/26 10:43:24 stroeder Exp $ +\$Id: ldapurl.py,v 1.79 2016/07/17 19:44:19 stroeder Exp $ Python compability note: This module only works with Python 2.0+ since @@ -32,7 +32,13 @@ LDAP_SCOPE_SUBTREE = 2 LDAP_SCOPE_SUBORDINATES = 3 -SEARCH_SCOPE_STR = {None:'',0:'base',1:'one',2:'sub',3:'subordinates'} +SEARCH_SCOPE_STR = { + None:'', + LDAP_SCOPE_BASE:'base', + LDAP_SCOPE_ONELEVEL:'one', + LDAP_SCOPE_SUBTREE:'sub', + LDAP_SCOPE_SUBORDINATES:'subordinates', +} SEARCH_SCOPE = { '':None,