diff options
| author | Barry Warsaw | 2015-01-04 20:20:33 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2015-01-04 20:20:33 -0500 |
| commit | 4a612db8e89afed74173b93f3b64fa567b8417a3 (patch) | |
| tree | 81a687d113079a25f93279f35c7eee2aa2572510 /src/mailman/core/initialize.py | |
| parent | 84af79988a4e916604cba31843778206efb7d1b8 (diff) | |
| parent | de181c1a40965a3a7deedd56a034a946f45b6984 (diff) | |
| download | mailman-4a612db8e89afed74173b93f3b64fa567b8417a3.tar.gz mailman-4a612db8e89afed74173b93f3b64fa567b8417a3.tar.zst mailman-4a612db8e89afed74173b93f3b64fa567b8417a3.zip | |
Diffstat (limited to 'src/mailman/core/initialize.py')
| -rw-r--r-- | src/mailman/core/initialize.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/mailman/core/initialize.py b/src/mailman/core/initialize.py index 3a0e27024..47d7106e2 100644 --- a/src/mailman/core/initialize.py +++ b/src/mailman/core/initialize.py @@ -24,9 +24,6 @@ line argument parsing, since some of the initialization behavior is controlled by the command line arguments. """ -from __future__ import absolute_import, print_function, unicode_literals - -__metaclass__ = type __all__ = [ 'initialize', 'initialize_1', @@ -38,16 +35,15 @@ __all__ = [ import os import sys - -from pkg_resources import resource_string -from zope.component import getUtility -from zope.configuration import xmlconfig - import mailman.config.config import mailman.core.logging from mailman.interfaces.database import IDatabaseFactory from mailman.utilities.modules import call_name +from pkg_resources import resource_string as resource_bytes +from zope.component import getUtility +from zope.configuration import xmlconfig + # The test infrastructure uses this to prevent the search and loading of any # existing configuration file. Otherwise the existence of say a @@ -109,8 +105,8 @@ def initialize_1(config_path=None): :param config_path: The path to the configuration file. :type config_path: string """ - zcml = resource_string('mailman.config', 'configure.zcml') - xmlconfig.string(zcml) + zcml = resource_bytes('mailman.config', 'configure.zcml') + xmlconfig.string(zcml.decode('utf-8')) # By default, set the umask so that only owner and group can read and # write our files. Specifically we must have g+rw and we probably want # o-rwx although I think in most cases it doesn't hurt if other can read |
