fix:個別マッピングリストの空白行はSKIPするように修正した

This commit is contained in:
*lcOeIaePm0 2021-11-16 12:15:18 +09:00
parent 61e4f194f4
commit f9c4b8a673

View File

@ -125,11 +125,12 @@ def init(bucket_name, target_key, target_data_source, target_file_name, log_info
mapping_body = io.TextIOWrapper(io.BytesIO(mapping_response["Body"].read()), encoding='utf-8')
settings_file_name = ''
for row in csv.reader(mapping_body, delimiter='\t'):
match_result = re.fullmatch(row[0], target_file_name)
if match_result is not None:
settings_file_name = row[1].rstrip()
print(f'{datetime.now():%Y-%m-%d %H:%M:%S} {log_info} {LOG_LEVEL["i"]} I-INI-18 - 個別設定ファイル:{settings_file_name} を特定しました')
break
if row:
match_result = re.fullmatch(row[0], target_file_name)
if match_result is not None:
settings_file_name = row[1].rstrip()
print(f'{datetime.now():%Y-%m-%d %H:%M:%S} {log_info} {LOG_LEVEL["i"]} I-INI-18 - 個別設定ファイル:{settings_file_name} を特定しました')
break
if not settings_file_name:
print(f'{datetime.now():%Y-%m-%d %H:%M:%S} {log_info} {LOG_LEVEL["e"]} E-INI-03 - 個別設定ファイルが特定出来ません')