# HG changeset patch # User Franz Glasner # Date 1601715135 -7200 # Node ID 9733aaa261ac154a219ee8409b425a0fe35d7c75 # Parent fc4c38f931cbc087c2d1a1a0ebbc23aaee6c8ad5 FIX: for PY2: test with the Unicode string variant when checking for "" prefixes diff -r fc4c38f931cb -r 9733aaa261ac configmix/__init__.py --- a/configmix/__init__.py Thu Sep 10 09:31:37 2020 +0200 +++ b/configmix/__init__.py Sat Oct 03 10:52:15 2020 +0200 @@ -13,7 +13,7 @@ from __future__ import division, print_function, absolute_import -__version__ = "0.10" +__version__ = "0.10.1.dev1" __revision__ = "|VCSRevision|" __date__ = "|VCSJustDate|" @@ -44,6 +44,12 @@ """ +DIR_PREFIX = u("") +"""Prefix for configuration values to read other configuration files from +given directory + +""" + def load(*files, **kwargs): """Load the given configuration files, merge them in the given order @@ -74,7 +80,7 @@ else: ex = merge(None, Configuration(defaults)) for f in files: - if f.startswith(""): + if f.startswith(DIR_PREFIX): for f2 in _get_configuration_files_from_dir(f[5:]): nx = _load_cfg_from_file(f2, ignore_unknown=True) if nx is not None: @@ -100,7 +106,7 @@ else: ex = safe_merge(None, Configuration(defaults)) for f in files: - if f.startswith(""): + if f.startswith(DIR_PREFIX): for f2 in _get_configuration_files_from_dir(f[5:]): nx = _load_cfg_from_file(f2, ignore_unknown=True) if nx is not None: