mirror of https://github.com/MISP/misp-modules
fix: Make pep8 happy
parent
a5ff849950
commit
6f4b88606b
|
@ -84,7 +84,8 @@ class CsvParser():
|
||||||
return_data.append(line)
|
return_data.append(line)
|
||||||
# find which delimiter is used
|
# find which delimiter is used
|
||||||
self.delimiter = self.find_delimiter()
|
self.delimiter = self.find_delimiter()
|
||||||
if self.fields_number == 0: self.header = return_data[0].split(self.delimiter)
|
if self.fields_number == 0:
|
||||||
|
self.header = return_data[0].split(self.delimiter)
|
||||||
self.data = return_data[1:] if self.has_header else return_data
|
self.data = return_data[1:] if self.has_header else return_data
|
||||||
|
|
||||||
def parse_delimiter(self, line):
|
def parse_delimiter(self, line):
|
||||||
|
@ -115,7 +116,8 @@ class CsvParser():
|
||||||
a_uuid, _, a_category, a_type, value, comment, to_ids, _, relation, o_uuid, o_name, o_category = line[:header_length]
|
a_uuid, _, a_category, a_type, value, comment, to_ids, _, relation, o_uuid, o_name, o_category = line[:header_length]
|
||||||
except ValueError:
|
except ValueError:
|
||||||
a_uuid, _, a_category, a_type, value, comment, to_ids, _, relation, tag, o_uuid, o_name, o_category = line[:header_length]
|
a_uuid, _, a_category, a_type, value, comment, to_ids, _, relation, tag, o_uuid, o_name, o_category = line[:header_length]
|
||||||
if tag: attribute['tags'] = tag
|
if tag:
|
||||||
|
attribute['tags'] = tag
|
||||||
except ValueError:
|
except ValueError:
|
||||||
continue
|
continue
|
||||||
for t, v in zip(attribute_fields, [a_uuid, a_category, a_type, value, comment]):
|
for t, v in zip(attribute_fields, [a_uuid, a_category, a_type, value, comment]):
|
||||||
|
|
Loading…
Reference in New Issue