Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2021-09-06 13:22:53 +0000
committerGitHub <noreply@github.com>2021-09-06 13:22:53 +0000
commit5fe752cf7223cc9ff1cf1a50ad5f7873594f83c1 (patch)
tree498a701a7db3c7199c47e9a481bc4f6ea92e96ec /archinstall
parentbbce3aa26afc3d55831954231579a5456b0da61a (diff)
No need for try/catch any longer.
The old behavior of SysCommand was that exit codes raised an exception, which needed to be handled by each individual caller. We now utilize `.exit_code` instead to manually detect faulty commands and raise exceptions where needed.
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/hardware.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py
index d040c19a..f38d46da 100644
--- a/archinstall/lib/hardware.py
+++ b/archinstall/lib/hardware.py
@@ -149,16 +149,5 @@ def virtualization() -> Optional[str]:
def is_vm() -> bool:
return b"none" not in b"".join(SysCommand("systemd-detect-virt")).lower()
- """
- try:
- # systemd-detect-virt issues a non-zero exit code if it is not on a virtual machine
- if b"none" not in b"".join(SysCommand("systemd-detect-virt")).lower():
- return True
- except:
- pass
-
- return False
-
- """
# TODO: Add more identifiers