Skip to content

Commit

Permalink
fixes #69, removed json request in error message output to avoid prin…
Browse files Browse the repository at this point in the history
…ting password in clear text, if you need it, enable debug logging
  • Loading branch information
neothematrix committed Dec 11, 2015
1 parent b7e3b52 commit 8a10cc4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pyzabbix/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,10 @@ def do_request(self, method, params=None):
if 'error' in response_json: # some exception
if 'data' not in response_json['error']: # some errors don't contain 'data': workaround for ZBX-9340
response_json['error']['data'] = "No data"
msg = u"Error {code}: {message}, {data} while sending {json}".format(
msg = u"Error {code}: {message}, {data}".format(
code=response_json['error']['code'],
message=response_json['error']['message'],
data=response_json['error']['data'],
json=str(request_json)
data=response_json['error']['data']
)
raise ZabbixAPIException(msg, response_json['error']['code'])

Expand Down

0 comments on commit 8a10cc4

Please sign in to comment.