This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/24453 )
Change subject: utils: Make filter_dict() transparently pass non-dict
......................................................................
utils: Make filter_dict() transparently pass non-dict
Change-Id: Ia1802101a62e21f1ce894d80728f939bf3da5a39
---
M pySim/construct.py
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/53/24453/1
diff --git a/pySim/construct.py b/pySim/construct.py
index 1527291..98c8c77 100644
--- a/pySim/construct.py
+++ b/pySim/construct.py
@@ -73,6 +73,8 @@
def filter_dict(d, exclude_prefix='_'):
"""filter the input dict to ensure no keys starting with 'exclude_prefix' remain."""
+ if not isinstance(d, dict):
+ return d
res = {}
for (key, value) in d.items():
if key.startswith(exclude_prefix):
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/24453
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia1802101a62e21f1ce894d80728f939bf3da5a39
Gerrit-Change-Number: 24453
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210529/3d31f369/attachment.htm>