Skip to content

Commit da66662

Browse files
Lekensteyncrobinso
authored andcommitted
base: Fix api_key authentication regression
Identifiers with a leading "__" are mangled, ensure that the original method is overridden such that authentication tokens are added. Fixes: v2.1.0-11-g3c692f4f4e ("_BugzillaServerProxy as new-style class")
1 parent 468238a commit da66662

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

bugzilla/transport.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def use_api_key(self, api_key):
8383
def clear_token(self):
8484
self.token_cache.value = None
8585

86-
def __request(self, methodname, params):
86+
def _ServerProxy__request(self, methodname, params):
8787
if len(params) == 0:
8888
params = ({}, )
8989

@@ -94,7 +94,7 @@ def __request(self, methodname, params):
9494
if 'Bugzilla_token' not in params[0]:
9595
params[0]['Bugzilla_token'] = self.token_cache.value
9696

97-
ret = super(_BugzillaServerProxy, self).__request(methodname, params)
97+
ret = super(_BugzillaServerProxy, self)._ServerProxy__request(methodname, params)
9898

9999
if isinstance(ret, dict) and 'token' in ret.keys():
100100
self.token_cache.value = ret.get('token')

0 commit comments

Comments
 (0)