mirror of
https://github.com/miurahr/aqtinstall.git
synced 2025-12-17 12:44:38 +03:00
Add suggestion on MemoryError to use external 7z
This commit is contained in:
@@ -850,14 +850,19 @@ def run_installer(archives: List[QtPackage], base_dir: str, sevenzip: Optional[s
|
|||||||
raise CliKeyboardInterrupt("Installer halted by keyboard interrupt.") from e
|
raise CliKeyboardInterrupt("Installer halted by keyboard interrupt.") from e
|
||||||
except MemoryError as e:
|
except MemoryError as e:
|
||||||
close_worker_pool_on_exception(e)
|
close_worker_pool_on_exception(e)
|
||||||
|
alt_extractor_msg = (
|
||||||
|
"Please try using the '--external' flag to specify an alternate 7z extraction tool "
|
||||||
|
"(see https://aqtinstall.readthedocs.io/en/latest/cli.html#cmdoption-list-tool-external)"
|
||||||
|
)
|
||||||
if Settings.concurrency > 1:
|
if Settings.concurrency > 1:
|
||||||
docs_url = "https://aqtinstall.readthedocs.io/en/stable/configuration.html#configuration"
|
docs_url = "https://aqtinstall.readthedocs.io/en/stable/configuration.html#configuration"
|
||||||
raise OutOfMemory(
|
raise OutOfMemory(
|
||||||
"Out of memory when downloading and extracting archives in parallel.",
|
"Out of memory when downloading and extracting archives in parallel.",
|
||||||
suggested_action=[f"Please reduce your 'concurrency' setting (see {docs_url})"],
|
suggested_action=[f"Please reduce your 'concurrency' setting (see {docs_url})", alt_extractor_msg],
|
||||||
) from e
|
) from e
|
||||||
raise OutOfMemory(
|
raise OutOfMemory(
|
||||||
"Out of memory when downloading and extracting archives.", suggested_action=["Please free up more memory."]
|
"Out of memory when downloading and extracting archives.",
|
||||||
|
suggested_action=["Please free up more memory.", alt_extractor_msg],
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
close_worker_pool_on_exception(e)
|
close_worker_pool_on_exception(e)
|
||||||
|
|||||||
@@ -614,7 +614,9 @@ def test_install_nonexistent_archives(monkeypatch, capsys, cmd, xml_file: Option
|
|||||||
"Out of memory when downloading and extracting archives in parallel.\n"
|
"Out of memory when downloading and extracting archives in parallel.\n"
|
||||||
"==============================Suggested follow-up:==============================\n"
|
"==============================Suggested follow-up:==============================\n"
|
||||||
"* Please reduce your 'concurrency' setting (see "
|
"* Please reduce your 'concurrency' setting (see "
|
||||||
"https://aqtinstall.readthedocs.io/en/stable/configuration.html#configuration)",
|
"https://aqtinstall.readthedocs.io/en/stable/configuration.html#configuration)\n"
|
||||||
|
"* Please try using the '--external' flag to specify an alternate 7z extraction tool "
|
||||||
|
"(see https://aqtinstall.readthedocs.io/en/latest/cli.html#cmdoption-list-tool-external)",
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
@@ -623,7 +625,9 @@ def test_install_nonexistent_archives(monkeypatch, capsys, cmd, xml_file: Option
|
|||||||
"Caught MemoryError, terminating installer workers\n"
|
"Caught MemoryError, terminating installer workers\n"
|
||||||
"Out of memory when downloading and extracting archives.\n"
|
"Out of memory when downloading and extracting archives.\n"
|
||||||
"==============================Suggested follow-up:==============================\n"
|
"==============================Suggested follow-up:==============================\n"
|
||||||
"* Please free up more memory.",
|
"* Please free up more memory.\n"
|
||||||
|
"* Please try using the '--external' flag to specify an alternate 7z extraction tool "
|
||||||
|
"(see https://aqtinstall.readthedocs.io/en/latest/cli.html#cmdoption-list-tool-external)",
|
||||||
1,
|
1,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user