Skip to content

Commit

Permalink
🐛 v1.3.2 (#79) Fixed an environment issue on Ubuntu 18.04.
Browse files Browse the repository at this point in the history
* Change mutable default argument to `None`.

* Set to empty list if `keys` is `None`.

* Return if the given config is not a dictionary.

* Ensure `parsed_config` is a dictionary.

* Bump to version 1.3.2
  • Loading branch information
bmeares authored Oct 14, 2022
1 parent 2ea3cd8 commit bf67786
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions meerschaum/config/_read_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,11 @@ def search_and_substitute_config(
"""

_links = []
def _find_symlinks(d, _keys: List[str] = []):
def _find_symlinks(d, _keys: Optional[List[str]] = None):
if _keys is None:
_keys = []
if not isinstance(d, dict):
return
for k, v in d.items():
if isinstance(v, dict):
_find_symlinks(v, _keys + [k])
Expand Down Expand Up @@ -345,7 +349,7 @@ def _find_symlinks(d, _keys: List[str] = []):
haystack = haystack.replace(pattern, str(value))

### parse back into dict
parsed_config = json.loads(haystack)
parsed_config = json.loads(haystack) or {}

symlinks = {}
if keep_symlinks:
Expand Down
2 changes: 1 addition & 1 deletion meerschaum/config/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Specify the Meerschaum release version.
"""

__version__ = "1.3.1"
__version__ = "1.3.2"

0 comments on commit bf67786

Please sign in to comment.