Updated base dir to self

Allows calling from unit test, still works on command line
This commit is contained in:
chrisdoman 2017-01-30 10:48:47 -06:00
parent 09710ce531
commit e720b61a3d

View File

@ -27,7 +27,7 @@ class SuricataClient(object):
return open(self.get_path(param), mode='w') return open(self.get_path(param), mode='w')
def get_path(self, param): def get_path(self, param):
return os.path.join(base_dir, param) return os.path.join(self.base_dir, param)
def generate_rules(self, generate_md5_rules=False, generate_iprep=False): def generate_rules(self, generate_md5_rules=False, generate_iprep=False):
with self.get_destination('otx_file_rules.rules') as file_rule_file: with self.get_destination('otx_file_rules.rules') as file_rule_file: