Mercurial > hgrepos > Python > libs > ConfigMix
changeset 256:7e26d31f52de
FIX: Allow non-text keys when merging: handle .startswith() errors gracefully
| author | Franz Glasner <f.glasner@feldmann-mg.com> |
|---|---|
| date | Wed, 08 Jul 2020 10:26:44 +0200 |
| parents | 3ecceab78951 |
| children | 428158054729 |
| files | configmix/__init__.py |
| diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/configmix/__init__.py Wed Jul 08 09:10:00 2020 +0200 +++ b/configmix/__init__.py Wed Jul 08 10:26:44 2020 +0200 @@ -450,8 +450,12 @@ def _is_comment(k): for i in COMMENTS: - if k.startswith(i): - return True + try: + if k.startswith(i): + return True + except AttributeError: + # non-string key + return False return False
