fix: Make pep8 happy

pull/304/head
chrisr3d 2019-05-02 14:07:36 +02:00
parent a5ff849950
commit 6f4b88606b
No known key found for this signature in database
GPG Key ID: 6BBED1B63A6D639F
1 changed files with 10 additions and 8 deletions

View File

@ -84,7 +84,8 @@ class CsvParser():
return_data.append(line)
# find which delimiter is used
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
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]
except ValueError:
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:
continue
for t, v in zip(attribute_fields, [a_uuid, a_category, a_type, value, comment]):