[#602] Use ExpandedPyMISP in case of a single MISP connection also

This commit is contained in:
3c7 2020-01-31 11:34:12 +01:00
parent f19d4494a2
commit 779b303579
No known key found for this signature in database
GPG Key ID: EFBE1131B58AFF51

View File

@ -57,9 +57,9 @@ class MISPClient:
elif isinstance(ssl, bool):
verify = ssl
self.misp_connections.append(pymisp.ExpandedPyMISP(url=server,
key=key[idx],
ssl=verify,
proxies=proxies))
key=key[idx],
ssl=verify,
proxies=proxies))
else:
verify = True
if isinstance(ssl, str) and os.path.isfile(ssl):
@ -68,10 +68,10 @@ class MISPClient:
raise CertificateNotFoundError('Certificate not found under {}.'.format(ssl))
elif isinstance(ssl, bool):
verify = ssl
self.misp_connections.append(pymisp.PyMISP(url=url,
key=key,
ssl=verify,
proxies=proxies))
self.misp_connections.append(pymisp.ExpandedPyMISP(url=url,
key=key,
ssl=verify,
proxies=proxies))
self.misp_name = name
@staticmethod