summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--searx/utils.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/searx/utils.py b/searx/utils.py
index 5e2ab18c4..22824d829 100644
--- a/searx/utils.py
+++ b/searx/utils.py
@@ -262,11 +262,7 @@ def dict_subset(d, properties):
>>> >> dict_subset({'A': 'a', 'B': 'b', 'C': 'c'}, ['A', 'D'])
{'A': 'a'}
"""
- result = {}
- for k in properties:
- if k in d:
- result[k] = d[k]
- return result
+ return {k: d[k] for k in properties if k in d}
def get_torrent_size(filesize, filesize_multiplier):