summaryrefslogtreecommitdiff
path: root/src/jwebmail/webmail.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/jwebmail/webmail.py')
-rw-r--r--src/jwebmail/webmail.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/jwebmail/webmail.py b/src/jwebmail/webmail.py
index 1b14af0..4ca1a67 100644
--- a/src/jwebmail/webmail.py
+++ b/src/jwebmail/webmail.py
@@ -202,18 +202,9 @@ def writemail():
def _take_common_req_args(mapping):
- res = dict()
- if mapping.get("sort"):
- res["sort"] = mapping["sort"]
- if mapping.get("search"):
- res["search"] = mapping["search"]
- if mapping.get("per_page"):
- res["per_page"] = mapping["per_page"]
- if mapping.get("page_bound"):
- res["page_bound"] = mapping["page_bound"]
- if mapping.get("after_page"):
- res["after_page"] = mapping["after_page"]
- return res
+ take = {"sort", "search", "per_page", "page_bound", "after_page"}
+
+ return {k: v for k, v in mapping.items() if k in take}
def move(folder=""):