Skip to content

Commit 7ede41a

Browse files
author
Andrei Neagu
committed
mypy
1 parent 0f315e0 commit 7ede41a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/modules/seven_zip_wrapper.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async def _get_file_count(zip_path: Path) -> int:
1818
raise SevenZipError(command=result.command, command_result=result.message)
1919

2020
match = re.search(r"\s*(\d+)\s*files", result.message)
21-
return int(match.group().replace("files", "").strip())
21+
return int(match.group().replace("files", "").strip() if match else "0")
2222

2323

2424
async def unarchive_zip_to(
@@ -37,6 +37,8 @@ async def unarchive_zip_to(
3737
process = await asyncio.create_subprocess_shell(
3838
command, stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE
3939
)
40+
assert process.stdout # nosec
41+
assert process.stderr # nosec
4042

4143
async with progress_bar.sub_progress(
4244
steps=file_count, description=IDStr("...")

0 commit comments

Comments
 (0)