Skip to content

Commit

Permalink
Improve debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafiot committed Nov 24, 2016
1 parent f62cf9f commit c90c73c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pymisp/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,9 @@ def __query(self, session, path, query, controller='events'):
raise Exception('Invalid controller. Can only be {}'.format(', '.join(['events', 'attributes'])))
url = urljoin(self.root_url, '{}/{}'.format(controller, path.lstrip('/')))
query = {'request': query}
if self.debug:
print('URL: ', url)
print('Query: ', query)
response = session.post(url, data=json.dumps(query))
return self._check_response(response)

Expand Down

0 comments on commit c90c73c

Please sign in to comment.