From f9c4b8a673b70c15ba3f17723ab7ba3a58e1936e Mon Sep 17 00:00:00 2001 From: *lcOeIaePm0 Date: Tue, 16 Nov 2021 12:15:18 +0900 Subject: [PATCH] =?UTF-8?q?fix:=E5=80=8B=E5=88=A5=E3=83=9E=E3=83=83?= =?UTF-8?q?=E3=83=94=E3=83=B3=E3=82=B0=E3=83=AA=E3=82=B9=E3=83=88=E3=81=AE?= =?UTF-8?q?=E7=A9=BA=E7=99=BD=E8=A1=8C=E3=81=AFSKIP=E3=81=99=E3=82=8B?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ecs/Dockerfile/dataimport/ini.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ecs/Dockerfile/dataimport/ini.py b/ecs/Dockerfile/dataimport/ini.py index c6d97c50..ecdbac7d 100644 --- a/ecs/Dockerfile/dataimport/ini.py +++ b/ecs/Dockerfile/dataimport/ini.py @@ -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 - 個別設定ファイルが特定出来ません')