Skip to content

Commit 029374b

Browse files
committed
[PRMP-570] removing redundant try catch
1 parent 56b2fc7 commit 029374b

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

lambdas/scripts/MigrationBase.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,13 @@ def process_entries(
6464
self.logger.info(f"[{label}] Item {item_id} update fields: {updated_fields}")
6565

6666
if self.run_migration:
67-
try:
68-
self.dynamo_service.update_item(
69-
table_name=self.target_table,
70-
key_pair={"ID": item_id},
71-
updated_fields=updated_fields,
72-
)
73-
self.logger.info(f"[{label}] Updated item {item_id}: {updated_fields}")
74-
successful_item_runs += 1
75-
except Exception as e:
76-
self.logger.error(f"[{label}] Failed to update item {item_id}: {str(e)}")
67+
self.dynamo_service.update_item(
68+
table_name=self.target_table,
69+
key_pair={"ID": item_id},
70+
updated_fields=updated_fields,
71+
)
72+
self.logger.info(f"[{label}] Updated item {item_id}: {updated_fields}")
73+
successful_item_runs += 1
7774
else:
7875
self.logger.info(f"[Dry Run] Would update item {item_id} with {updated_fields}")
7976
successful_item_runs += 1

0 commit comments

Comments
 (0)