feat: IndexErrorを使用せず、CSVの列不足の確認するようにした
This commit is contained in:
parent
4128682272
commit
e8b9432be2
@ -136,12 +136,9 @@ class MasterMainteCSVItem(metaclass=ABCMeta):
|
||||
return (error_list, start_date_time, end_date_time)
|
||||
|
||||
def get_csv_value(self, column_no: int):
|
||||
try:
|
||||
column_value = self.csv_row[column_no]
|
||||
except IndexError:
|
||||
column_value = ''
|
||||
|
||||
return column_value
|
||||
if len(self.csv_row) <= column_no:
|
||||
return ''
|
||||
return self.csv_row[column_no]
|
||||
|
||||
@abstractmethod
|
||||
def csv_row_data(self) -> dict:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user