File tree Expand file tree Collapse file tree
src/dali/plugin/input/csv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ class InputPlugin(AbstractInputPlugin):
5353 __IN_FIAT_FEE_INDEX : int = 11
5454 __IN_NOTES_INDEX : int = 12
5555 __IN_FIAT_TICKER : int = 13
56+ __IN_LEN = __IN_FIAT_TICKER
5657
5758 __OUT_UNIQUE_ID_INDEX : int = 0
5859 __OUT_TIMESTAMP_INDEX : int = 1
@@ -120,15 +121,15 @@ def _load_in_file(self, transactions: List[AbstractTransaction]) -> None:
120121 raw_data : str = "," .join (line ).strip ()
121122 if not header_found :
122123 # let user know there is not enough columns
123- if len (line ) - 1 < self .__IN_NOTES_INDEX :
124- raise ValueError (f"Not enough columns: the { self .__in_csv_file } CSV must contain { self .__IN_NOTES_INDEX } columns." )
124+ if len (line ) - 1 < self .__IN_LEN :
125+ raise ValueError (f"Not enough columns: the { self .__in_csv_file } CSV must contain { self .__IN_LEN } columns." )
125126
126127 # Skip header line
127128 header_found = True
128129 self .__logger .debug ("Header: %s" , ";" .join (line ))
129130 continue
130131
131- if raw_data .startswith ("," * self .__IN_NOTES_INDEX ):
132+ if raw_data .startswith ("," * self .__IN_LEN ):
132133 # Skip empty lines
133134 continue
134135
You can’t perform that action at this time.
0 commit comments