fix: Don't even bother trying with futuressession if Async isn't ok

fixes #85
pull/88/head
Hannah Ward 2017-05-16 10:27:54 +01:00
parent 9f2ef8516e
commit a7892c03ff
No known key found for this signature in database
GPG Key ID: 6F3BAD60DE190290
1 changed files with 1 additions and 1 deletions

View File

@ -777,7 +777,7 @@ class PyMISP(object):
logger.debug('URL: ', url)
logger.debug('Query: ', query)
if 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)
else:
response = session.post(url, data=json.dumps(query))