Skip to content

Commit

Permalink
#35 Add backward compatibility fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nadouani committed Apr 6, 2017
1 parent 2c25fa8 commit b1fe05f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions contrib/cortexutils/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,32 @@ def __init__(self):
if not (self.__check_tlp()):
self.error('TLP is higher than allowed.')

# Not breaking compatibility
self.artifact = self.__input

# Not breaking compatibility
def notSupported(self):
self.error('This datatype is not supported by this analyzer.')

# Not breaking compatibility
def unexpectedError(self, e):
self.error('Unexpected Error: ' + str(e))

# Not breaking compatibility
def getData(self):
"""For not breaking compatibility to cortexutils.analyzer, this wraps get_data()"""
return self.get_data()

# Not breaking compatibility
def getParam(self, name, default=None, message=None):
"""For not breaking compatibility to cortexutils.analyzer, this wraps get_param()"""
return self.get_param(name=name, default=default, message=message)

# Not breaking compatibility
def checkTlp(self, message):
if not (self.__check_tlp()):
self.error(message)

def __set_proxies(self):
if self.http_proxy is not None:
os.environ['http_proxy'] = self.http_proxy
Expand Down

0 comments on commit b1fe05f

Please sign in to comment.