Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit b105755

Browse files
authored
Merge pull request #20 from filintod/master
fix acl role with policy
2 parents c2596c6 + 9cbc941 commit b105755

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

consul/base.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,17 +1074,18 @@ def list(
10741074
:return:
10751075
"""
10761076

1077+
path = '/v1/acl/roles'
1078+
params = []
10771079
if policy:
1078-
path = '/v1/acl/roles?policy=%s' % policy
1079-
else:
1080-
path = '/v1/acl/roles'
1080+
params.append(('policy', policy))
10811081
headers = {}
10821082
token = token or self.agent.token
10831083
if token:
10841084
headers['X-Consul-Token'] = token
10851085

10861086
return self.agent.http.get(CB.json(),
10871087
path=path,
1088+
params=params,
10881089
headers=headers)
10891090

10901091
class AuthMethod(object):

0 commit comments

Comments
 (0)