mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-09-20 08:05:33 +03:00
Made error message of chia plotters version
more traceable (#13704)
This commit is contained in:
parent
45b5ea39bb
commit
6dfbc1ef7c
@ -38,7 +38,11 @@ def meets_memory_requirement(plotters_root_path: Path) -> Tuple[bool, Optional[s
|
||||
"Failed to call bladebit with --memory-json option",
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
if proc.returncode != 0:
|
||||
return have_enough_memory, proc.stderr.strip()
|
||||
|
||||
memory_info: Dict[str, int] = json.loads(proc.stdout)
|
||||
total_bytes: int = memory_info.get("total", -1)
|
||||
required_bytes: int = memory_info.get("required", 0)
|
||||
@ -104,7 +108,11 @@ def get_bladebit_version(plotters_root_path: Path):
|
||||
"Failed to call bladebit with --version option",
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
if proc.returncode != 0:
|
||||
return None, proc.stderr.strip()
|
||||
|
||||
# (Found, versionStr)
|
||||
version_str: str = proc.stdout.strip()
|
||||
return True, version_str.split(".")
|
||||
|
@ -86,7 +86,11 @@ def get_madmax_version(plotters_root_path: Path):
|
||||
"Failed to call madmax with --version option",
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=False,
|
||||
)
|
||||
if proc.returncode != 0:
|
||||
return None, proc.stderr.strip()
|
||||
|
||||
# (Found, versionStr)
|
||||
version_str = proc.stdout.strip()
|
||||
return True, version_str.split(".")
|
||||
@ -108,7 +112,7 @@ def get_madmax_install_info(plotters_root_path: Path) -> Optional[Dict[str, Any]
|
||||
if found:
|
||||
version = ".".join(result_msg)
|
||||
elif found is None:
|
||||
print(result_msg)
|
||||
print(f"Failed to determine madMAx version: {result_msg}")
|
||||
|
||||
if version is not None:
|
||||
installed = True
|
||||
|
Loading…
Reference in New Issue
Block a user