Skip to content

Commit

Permalink
Fixes #218, get_data() returns filename for files instead the data fi…
Browse files Browse the repository at this point in the history
…eld.
  • Loading branch information
3c7 committed Apr 4, 2018
1 parent e1631bc commit c6a8384
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions contrib/cortexutils/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@ def get_data(self):
"""Wrapper for getting data from input dict.
:return: Data (observable value) given through Cortex"""
if self.data_type == 'file':
return self.get_param('filename', None, 'Missing filename.')
return self.get_param('data', None, 'Missing data field')

def get_param(self, name, default=None, message=None):
Expand Down
2 changes: 1 addition & 1 deletion contrib/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name='cortexutils',
version='1.2.2',
version='1.2.3',
description='A Python library for including utility classes for Cortex analyzers',
long_description=open('README').read(),
author='TheHive-Project',
Expand Down

0 comments on commit c6a8384

Please sign in to comment.