Skip to content

Commit 4de3a01

Browse files
kevin-bateslresende
authored andcommitted
[HOTFIX] Fix how params dict is passed to request()
The params dict was being passed as a kwargs parameter (`**params`) rather than as a kwarg itself (e.g., `params=params`). As a result, the change in the `request()` method was passing each of the parameters intended for the YARN RM as keyword arguments to the `requests()` method itself. This produced the following error on such requests... ``` <class 'TypeError'> - 'request() got an unexpected keyword argument 'startedTimeBegin' ``` resulting in failures in `0.3.4`.
1 parent 89d2f9e commit 4de3a01

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

yarn_api_client/resource_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def cluster_applications(self, state=None, final_status=None,
135135

136136
params = self.construct_parameters(loc_args)
137137

138-
return self.request(path, **params)
138+
return self.request(path, params=params)
139139

140140
def cluster_application_statistics(self, state_list=None,
141141
application_type_list=None):
@@ -174,7 +174,7 @@ def cluster_application_statistics(self, state_list=None,
174174
('applicationTypes', application_types))
175175
params = self.construct_parameters(loc_args)
176176

177-
return self.request(path, **params)
177+
return self.request(path, params=params)
178178

179179
def cluster_application(self, application_id):
180180
"""

0 commit comments

Comments
 (0)