Hi,
This actually is not working when the URL does not work, e.g: connection refused.
As the code inside the try statement is not executed, it doesn't know any responseStream.
j4p = Jolokia('http://localhost:7778/jolokia/')
Traceback (most recent call last):
File "jolokia.py", line 49, in
main()
File "jolokia.py", line 38, in main
data = j4p.getRequests()
File "pyjolokia.py", line 184, in getRequests
response = self.__getJson()
File "pyjolokia.py", line 139, in __getJson
responseStream.close()
UnboundLocalError: local variable 'responseStream' referenced before assignment