Projects
Kolab:Winterfell
pykolab-python3
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 3
View file
pykolab-0.9.0.tar.gz/conf/kolab.conf
Changed
@@ -194,7 +194,7 @@ ; generic base DN, scope and filter allow us to configure other services as ; well, including Address Books in Roundcube and for Syncroton, the list of ; users in the web admin (API), etc. -user_base_dn = ou=%(base_dn)s +user_base_dn = %(base_dn)s user_scope = sub user_filter = (objectclass=inetorgperson) @@ -206,7 +206,7 @@ ; ; Note that all user_* settings are valid, and those not available with a kolab_ ; prefix fall back to using the generic user_* equivalent setting. -kolab_user_base_dn = ou=%(base_dn)s +kolab_user_base_dn = %(base_dn)s kolab_user_filter = (objectclass=kolabinetorgperson) ; Add additional <key>_user_base_dn, <key>_user_scope and <key>_user_filter.
View file
pykolab-0.9.0.tar.gz/cyruslib.py
Changed
@@ -36,6 +36,7 @@ try: import imaplib import re + import six from binascii import b2a_base64 except ImportError as e: print(e) @@ -62,6 +63,31 @@ re_mb = re.compile(r'\((.*)\)\s\".\"\s(.*)') re_url = re.compile(r'^(imaps?)://(.+?):?(\d{0,5})$') +def ensure_str(s, encoding='utf-8', errors='strict'): + """Coerce *s* to `str`. + For Python 2: + - `unicode` -> encoded to `str` + - `str` -> `str` + For Python 3: + - `str` -> `str` + - `bytes` -> decoded to `str` + + Copied from six (not available < 1.12) + """ + # Optimization: Fast return for the common case. + if type(s) is str: + return s + if isinstance(s, list): + #FIXME pass encoding + return list(map(ensure_str, s)) + if six.PY2 and isinstance(s, six.text_type): + return s.encode(encoding, errors) + elif six.PY3 and isinstance(s, six.binary_type): + return s.decode(encoding, errors) + elif not isinstance(s, (six.text_type, six.binary_type)): + raise TypeError("not expecting type '%s'" % type(s)) + return s + def ok(res): return res.upper().startswith('OK') @@ -511,7 +537,7 @@ def decode(self, text): if self.ENCODING == 'imap': - return text + return quote(ensure_str(text)) elif self.ENCODING in self.ENCODING_LIST: return self.__decode(text) @@ -591,7 +617,7 @@ self.__prepare('GETACL', mailbox) res, acl = self.__docommand("getacl", self.decode(mailbox)) acls = {} - aclList = splitquote(acl.pop().strip()) + aclList = splitquote(ensure_str(acl.pop().strip())) del aclList0 # mailbox for i in range(0, len(aclList), 2): try:
View file
pykolab-0.9.0.tar.gz/pykolab/auth/ldap/__init__.py
Changed
@@ -2377,8 +2377,7 @@ return naming_context log.warning( - _l("Failed to find a naming context for: %s") % (domain), - level=8 + _l("Failed to find a naming context for: %s") % (domain) ) def _primary_domain_for_naming_context(self, naming_context):
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.