Skip to content

Commit 84719df

Browse files
committed
improve(processing): move single progress outside quick fail or normal mode blocks
1 parent f1e1109 commit 84719df

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

dicogis/georeaders/process_files.py

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -259,32 +259,28 @@ def export_metadataset(
259259
Returns:
260260
dataset to process, metadataset or None if something went wrong
261261
"""
262+
self.update_progress(
263+
message_to_display="Exporting metadata of "
264+
f"{dataset_to_process.file_path.name}..."
265+
)
262266
if self.opt_quick_fail:
263-
self.update_progress(
264-
message_to_display="Exporting metadata of "
265-
f"{dataset_to_process.file_path}..."
266-
)
267267
# writing to the Excel file
268268
self.serializer.serialize_metadaset(metadataset=metadataset_to_serialize)
269269
self.update_progress(
270-
message_to_display="Exporting metadata of "
271-
f"{dataset_to_process.file_path}: OK",
270+
message_to_display="Metadata of "
271+
f"{dataset_to_process.file_path.name}: EXPORTED",
272272
increment_counter=True,
273273
)
274274
logger.debug(f"Exporting metadata of {dataset_to_process.file_path}: OK")
275275
dataset_to_process.exported = True
276276
return dataset_to_process, metadataset_to_serialize
277277

278278
try:
279-
self.update_progress(
280-
message_to_display="Exporting metadata of "
281-
f"{dataset_to_process.file_path}..."
282-
)
283279
# writing to the Excel file
284280
self.serializer.serialize_metadaset(metadataset=metadataset_to_serialize)
285281
self.update_progress(
286-
message_to_display="Exporting metadata of "
287-
f"{dataset_to_process.file_path}: OK",
282+
message_to_display="Metadata of "
283+
f"{dataset_to_process.file_path.name}: EXPORTED",
288284
increment_counter=True,
289285
)
290286
logger.debug(f"Exporting metadata of {dataset_to_process.file_path}: OK")

0 commit comments

Comments
 (0)