Fix typos

pull/84/head
Raphaël Vinot 2017-05-03 16:49:51 +02:00
parent db768ffef0
commit 8b3d17c5d0
1 changed files with 5 additions and 5 deletions

View File

@ -104,7 +104,7 @@ class PyMISP(object):
self.ssl = ssl self.ssl = ssl
self.proxies = proxies self.proxies = proxies
self.cert = cert self.cert = cert
self.asynch = asynch self.asynch = asynch
if asynch and not ASYNC_OK: if asynch and not ASYNC_OK:
warnings.warn("You turned on Async, but don't have requests_futures installed") warnings.warn("You turned on Async, but don't have requests_futures installed")
self.asynch = False self.asynch = False
@ -113,7 +113,7 @@ class PyMISP(object):
if out_type != 'json': if out_type != 'json':
raise PyMISPError('The only output type supported by PyMISP is JSON. If you still rely on XML, use PyMISP v2.4.49') raise PyMISPError('The only output type supported by PyMISP is JSON. If you still rely on XML, use PyMISP v2.4.49')
if debug is not None: if debug is not None:
warning.warn('debug is deprecated, configure logging in api client') warnings.warn('debug is deprecated, configure logging in api client')
try: try:
# Make sure the MISP instance is working and the URL is valid # Make sure the MISP instance is working and the URL is valid
@ -159,7 +159,7 @@ class PyMISP(object):
if self.asynch and async_implemented: if self.asynch and async_implemented:
session = FuturesSession() session = FuturesSession()
else: else:
session = requests.Session() session = requests.Session()
session.verify = self.ssl session.verify = self.ssl
session.proxies = self.proxies session.proxies = self.proxies
session.cert = self.cert session.cert = self.cert
@ -834,7 +834,7 @@ class PyMISP(object):
if not set(param).issubset(rule_levels[rule]): if not set(param).issubset(rule_levels[rule]):
raise SearchError('Values in your {} are invalid, has to be in {}'.format(rule, ', '.join(str(x) for x in rule_levels[rule]))) raise SearchError('Values in your {} are invalid, has to be in {}'.format(rule, ', '.join(str(x) for x in rule_levels[rule])))
to_post[rule] = '|'.join(str(x) for x in param) to_post[rule] = '|'.join(str(x) for x in param)
session = self.__prepare_session(async_implemented=(async_callback!=None)) session = self.__prepare_session(async_implemented=(async_callback is not None))
url = urljoin(self.root_url, buildup_url) url = urljoin(self.root_url, buildup_url)
if self.asynch and async_callback: if self.asynch and async_callback:
@ -978,7 +978,7 @@ class PyMISP(object):
query['published'] = kwargs.get('published') query['published'] = kwargs.get('published')
# Create a session, make it async if and only if we have a callback # Create a session, make it async if and only if we have a callback
session = self.__prepare_session(async_implemented=(async_callback!=None)) session = self.__prepare_session(async_implemented=(async_callback is not None))
return self.__query(session, 'restSearch/download', query, controller, async_callback) return self.__query(session, 'restSearch/download', query, controller, async_callback)
def get_attachment(self, event_id): def get_attachment(self, event_id):