From 872d8dfa74f827e2cde27cfec2ae08cc0d50fac3 Mon Sep 17 00:00:00 2001 From: Chris Griffith Date: Thu, 3 Nov 2016 14:43:11 -0500 Subject: [PATCH] Version 0.6.1 --- CHANGES.rst | 6 ++++++ README.rst | 2 +- reusables/__init__.py | 2 +- reusables/reusables.py | 5 +++-- test/test_reuse.py | 2 +- 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index 416dae8..8aee098 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -1,6 +1,12 @@ Changelog ========= +Version 0.6.1 +------------- + +- Changing config_dict auto_find to accept a path to search at +- PyPI is stupid is why 0.6.0 is not up there + Version 0.6.0 ------------- diff --git a/README.rst b/README.rst index f7abf69..22b9b25 100644 --- a/README.rst +++ b/README.rst @@ -102,7 +102,7 @@ Command line helpers -------------------- Use the Python interpreter as much as a shell? Here's some handy helpers to -fill the void. (Please don't do 'import *' in production code, this is used +fill the void. (Please don't do 'import \*' in production code, this is used as an easy to use example using the interpreter interactively.) .. code:: python diff --git a/reusables/__init__.py b/reusables/__init__.py index 36c6cbb..fc31e31 100644 --- a/reusables/__init__.py +++ b/reusables/__init__.py @@ -9,4 +9,4 @@ from .web import * __author__ = "Chris Griffith" -__version__ = "0.6.0" +__version__ = "0.6.1" diff --git a/reusables/reusables.py b/reusables/reusables.py index aa9a873..61d72e8 100644 --- a/reusables/reusables.py +++ b/reusables/reusables.py @@ -215,8 +215,9 @@ def config_dict(config_file=None, auto_find=False, verify=True, **cfg_options): cfg_files.extend(config_file) if auto_find: - cfg_files.extend(find_all_files(current_root, - ext=(".cfg", ".config", ".ini"))) + cfg_files.extend(find_all_files( + current_root if isinstance(auto_find, bool) else auto_find, + ext=(".cfg", ".config", ".ini"))) _logger.info("config files to be used: {0}".format(cfg_files)) diff --git a/test/test_reuse.py b/test/test_reuse.py index 1b81e3a..5575df7 100644 --- a/test/test_reuse.py +++ b/test/test_reuse.py @@ -46,7 +46,7 @@ def test_get_config_dict(self): assert resp['Section 2'] == {} def test_get_config_dict_auto(self): - resp = reusables.config_dict(auto_find=True) + resp = reusables.config_dict(auto_find="test") assert resp.get('Section1') == {'key 1': 'value 1', 'key2': 'Value2'} def test_get_config_dict_no_verify(self):