Skip to content

Commit dc5f58b

Browse files
authored
Merge pull request #12272 from pquentin/pquentin-patch-1
Fix urllib3 getheaders warning
2 parents 2a2b167 + d97b455 commit dc5f58b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

modules/swagger-codegen/src/main/resources/python/rest.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@ class RESTResponse(io.IOBase):
3434

3535
def getheaders(self):
3636
"""Returns a dictionary of the response headers."""
37-
return self.urllib3_response.getheaders()
37+
return self.urllib3_response.headers
3838

3939
def getheader(self, name, default=None):
4040
"""Returns a given response header."""
41-
return self.urllib3_response.getheader(name, default)
41+
return self.urllib3_response.headers.get(name, default)
4242

4343

4444
class RESTClientObject(object):

0 commit comments

Comments
 (0)