Fix missing %s in debug

Missing %s in logger.debug call lead to error.
pull/212/head
aparriel 2017-05-31 18:07:31 +02:00 committed by GitHub
parent 56059a8516
commit 72382f7618
1 changed files with 3 additions and 3 deletions

View File

@ -774,8 +774,8 @@ class PyMISP(object):
if controller not in ['events', 'attributes']: if controller not in ['events', 'attributes']:
raise Exception('Invalid controller. Can only be {}'.format(', '.join(['events', 'attributes']))) raise Exception('Invalid controller. Can only be {}'.format(', '.join(['events', 'attributes'])))
url = urljoin(self.root_url, '{}/{}'.format(controller, path.lstrip('/'))) url = urljoin(self.root_url, '{}/{}'.format(controller, path.lstrip('/')))
logger.debug('URL: ', url) logger.debug('URL: %s', url)
logger.debug('Query: ', query) logger.debug('Query: %s', query)
if ASYNC_OK and isinstance(session, FuturesSession) and async_callback: if ASYNC_OK and isinstance(session, FuturesSession) and async_callback:
response = session.post(url, data=json.dumps(query), background_callback=async_callback) response = session.post(url, data=json.dumps(query), background_callback=async_callback)
@ -1468,7 +1468,7 @@ class PyMISP(object):
session = self.__prepare_session() session = self.__prepare_session()
url = urljoin(self.root_url, "/events/stix/download/{}/{}/{}/{}/{}".format( url = urljoin(self.root_url, "/events/stix/download/{}/{}/{}/{}/{}".format(
event_id, with_attachments, tags, from_date, to_date)) event_id, with_attachments, tags, from_date, to_date))
logger.debug("Getting STIX event from", url) logger.debug("Getting STIX event from %s", url)
response = session.get(url) response = session.get(url)
return self._check_response(response) return self._check_response(response)