mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[fix] Remove useless raw argument in domain_list
This commit is contained in:
parent
5676de11da
commit
a557956a47
2 changed files with 2 additions and 11 deletions
|
@ -243,10 +243,6 @@ domain:
|
||||||
authenticate: all
|
authenticate: all
|
||||||
authenticator: ldap-anonymous
|
authenticator: ldap-anonymous
|
||||||
arguments:
|
arguments:
|
||||||
-r:
|
|
||||||
full: --raw
|
|
||||||
help: Return domains as a bash-usable list instead of JSON
|
|
||||||
action: store_true
|
|
||||||
-f:
|
-f:
|
||||||
full: --filter
|
full: --filter
|
||||||
help: LDAP filter used to search
|
help: LDAP filter used to search
|
||||||
|
|
|
@ -39,12 +39,11 @@ from moulinette.utils.log import getActionLogger
|
||||||
logger = getActionLogger('yunohost.domain')
|
logger = getActionLogger('yunohost.domain')
|
||||||
|
|
||||||
|
|
||||||
def domain_list(auth, raw=False, filter=None, limit=None, offset=None):
|
def domain_list(auth, filter=None, limit=None, offset=None):
|
||||||
"""
|
"""
|
||||||
List domains
|
List domains
|
||||||
|
|
||||||
Keyword argument:
|
Keyword argument:
|
||||||
raw -- Return domains as a bash-usable list instead of JSON
|
|
||||||
filter -- LDAP filter used to search
|
filter -- LDAP filter used to search
|
||||||
offset -- Starting number for domain fetching
|
offset -- Starting number for domain fetching
|
||||||
limit -- Maximum number of domain fetched
|
limit -- Maximum number of domain fetched
|
||||||
|
@ -66,11 +65,7 @@ def domain_list(auth, raw=False, filter=None, limit=None, offset=None):
|
||||||
for domain in result[offset:offset+limit]:
|
for domain in result[offset:offset+limit]:
|
||||||
result_list.append(domain['virtualdomain'][0])
|
result_list.append(domain['virtualdomain'][0])
|
||||||
|
|
||||||
if raw:
|
return { 'domains': result_list }
|
||||||
for domain in result_list:
|
|
||||||
print domain
|
|
||||||
else:
|
|
||||||
return { 'domains': result_list }
|
|
||||||
|
|
||||||
|
|
||||||
def domain_add(auth, domain, dyndns=False):
|
def domain_add(auth, domain, dyndns=False):
|
||||||
|
|
Loading…
Add table
Reference in a new issue