# HACK: Python 2.x support, see http://bugs.python.org/issue2128
CONFIG.set('system', 'argv-encoding', '')
-CONFIG.read(_os_path.expanduser('~/.mutt-ldap.rc'))
-
class LDAPConnection (object):
"""Wrap an LDAP connection supporting the 'with' statement
import locale as _locale
import sys as _sys
+ read_configfiles = CONFIG.read(_os_path.expanduser('~/.mutt-ldap.rc'))
+
default_encoding = _locale.getpreferredencoding(do_setlocale=True)
for key in ['output-encoding', 'argv-encoding']:
CONFIG.set(
argv_encoding = CONFIG.get('system', 'argv-encoding')
_sys.argv = [unicode(arg, argv_encoding) for arg in _sys.argv]
+ LOG.info(u'loaded configuration from {0}'.format(read_configfiles))
+
if len(_sys.argv) < 2:
_sys.stderr.write(
u'{0}: no search string given\n'.format(_sys.argv[0]))