mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
The hell with 'pythonic try/except' ... Just use a goddamn if/else for that kind of stuff
This commit is contained in:
parent
db29a9aa38
commit
6f1133b205
1 changed files with 2 additions and 3 deletions
|
@ -327,11 +327,10 @@ class _ActionsMapPlugin(object):
|
|||
# Append other request params
|
||||
for k, v in request.params.dict.items():
|
||||
v = _format(v)
|
||||
try:
|
||||
curr_v = params[k]
|
||||
except KeyError:
|
||||
if k not in params.keys():
|
||||
params[k] = v
|
||||
else:
|
||||
curr_v = params[k]
|
||||
# Append param value to the list
|
||||
if not isinstance(curr_v, list):
|
||||
curr_v = [curr_v]
|
||||
|
|
Loading…
Add table
Reference in a new issue