Helper function to check subprocess.run returncode equals 0 If not raise AssertionError
(self, ret)
| 701 | return pathlib.Path("/") |
| 702 | |
| 703 | def _check_retcode(self, ret): |
| 704 | """ |
| 705 | Helper function to check subprocess.run returncode equals 0 |
| 706 | If not raise AssertionError |
| 707 | """ |
| 708 | if ret.returncode != 0: |
| 709 | log.error(ret) |
| 710 | # Provide better error message for Windows access violation |
| 711 | # 0xC0000005 as signed 32-bit integer is 3221225477 |
| 712 | if platform.is_windows() and ret.returncode in (0xC0000005, 3221225477): |
| 713 | log.error( |
| 714 | "Windows installer crashed with access violation (0xC0000005). " |
| 715 | "This may indicate a file locking issue or that services weren't fully stopped." |
| 716 | ) |
| 717 | assert ret.returncode == 0 |
| 718 | return True |
| 719 | |
| 720 | def _install_pkgs(self, upgrade=False, downgrade=False): |
| 721 | if downgrade: |
no test coverage detected