fix: Properly pass the distribution when uploading a sample

Fix: https://github.com/MISP/PyMISP/issues/129
pull/141/head
Raphaël Vinot 2017-11-01 17:26:58 -07:00
parent 4b53b399d0
commit e5a7153284
1 changed files with 3 additions and 0 deletions

View File

@ -759,6 +759,9 @@ class PyMISP(object):
to_post['request']['info'] = misp_event.info to_post['request']['info'] = misp_event.info
to_post['request']['analysis'] = misp_event.analysis to_post['request']['analysis'] = misp_event.analysis
to_post['request']['threat_level_id'] = misp_event.threat_level_id to_post['request']['threat_level_id'] = misp_event.threat_level_id
else:
if distribution is not None:
to_post['request']['distribution'] = distribution
default_values = self.sane_default['malware-sample'] default_values = self.sane_default['malware-sample']
if to_ids is None or not isinstance(to_ids, bool): if to_ids is None or not isinstance(to_ids, bool):