# HG changeset patch # User Franz Glasner # Date 1594196804 -7200 # Node ID 7e26d31f52de15095d966cfc7909e455cdc0d764 # Parent 3ecceab78951ba1b58486d95c0833f54f0bd6262 FIX: Allow non-text keys when merging: handle .startswith() errors gracefully diff -r 3ecceab78951 -r 7e26d31f52de configmix/__init__.py --- 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