Skip to content

Commit 41a4e6f

Browse files
committed
Fix a undefined variable error.
1 parent 88d270a commit 41a4e6f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

rubisco/lib/archive/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def extract_file( # pylint: disable=too-many-branches # noqa: C901 PLR0912
110110
rm_recursive(dest)
111111
with dest.open("wb") as fdst:
112112
if fsize > COPY_BUFSIZE * 50:
113-
task_name = fast_format_str(
113+
task_start_msg = fast_format_str(
114114
_(
115115
"Extracting ${{file}} to ${{path}} as '${{type}}' ...",
116116
),
@@ -120,10 +120,11 @@ def extract_file( # pylint: disable=too-many-branches # noqa: C901 PLR0912
120120
"type": compress_type,
121121
},
122122
)
123+
task_name = _("Extracting")
123124
call_ktrigger(
124125
IKernelTrigger.on_new_task,
126+
task_start_msg=task_start_msg,
125127
task_name=task_name,
126-
task_type=IKernelTrigger.TASK_EXTRACT,
127128
total=fsize,
128129
)
129130
while buf := fsrc.read(COPY_BUFSIZE):
@@ -330,7 +331,7 @@ def compress_file( # pylint: disable=R0912 # noqa: C901 PLR0912
330331
fsrc.seek(0, os.SEEK_SET)
331332
with dest.open("wb") as fdst:
332333
if fsize > COPY_BUFSIZE * 50:
333-
task_name = fast_format_str(
334+
task_start_msg = fast_format_str(
334335
_(
335336
"Compressing ${{path}} to ${{file}} as '${{type}}' ...",
336337
),
@@ -340,10 +341,11 @@ def compress_file( # pylint: disable=R0912 # noqa: C901 PLR0912
340341
"type": compress_type,
341342
},
342343
)
344+
task_name = _("Compressing")
343345
call_ktrigger(
344346
IKernelTrigger.on_new_task,
347+
task_start_msg=task_start_msg,
345348
task_name=task_name,
346-
task_type=IKernelTrigger.TASK_COMPRESS,
347349
total=fsize,
348350
)
349351
while buf := fsrc.read(COPY_BUFSIZE):

0 commit comments

Comments
 (0)