mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
Listing fix
This commit is contained in:
parent
57c15cda02
commit
434d70d011
2 changed files with 4 additions and 2 deletions
|
@ -52,9 +52,11 @@ def pretty_print_dict(d, depth=0):
|
|||
pretty_print_dict(v, depth+1)
|
||||
elif isinstance(v, list):
|
||||
print((" ") * depth + ("%s: " % str(k)))
|
||||
for value in v:
|
||||
for key, value in enumerate(v):
|
||||
if isinstance(value, tuple):
|
||||
pretty_print_dict({value[0]: value[1]}, depth+1)
|
||||
elif isinstance(value, dict):
|
||||
pretty_print_dict({key: value}, depth+1)
|
||||
else:
|
||||
print((" ") * (depth+1) + "- " +str(value))
|
||||
else:
|
||||
|
|
|
@ -57,7 +57,7 @@ def user_list(fields=None, filter=None, limit=None, offset=None):
|
|||
if 'mailalias' in user:
|
||||
entry['Mail Aliases'] = user['mailalias']
|
||||
|
||||
result_list.append((str(i), entry))
|
||||
result_list.append(entry)
|
||||
i += 1
|
||||
else:
|
||||
raise YunoHostError(167, _("No user found"))
|
||||
|
|
Loading…
Add table
Reference in a new issue