diff --git a/src/distro/distro.py b/src/distro/distro.py index f83d787..77e2c68 100755 --- a/src/distro/distro.py +++ b/src/distro/distro.py @@ -1204,7 +1204,7 @@ def _uname_info(self) -> Dict[str, str]: try: cmd = ("uname", "-rs") stdout = subprocess.check_output(cmd, stderr=subprocess.DEVNULL) - except OSError: + except (OSError, subprocess.CalledProcessError): return {} content = self._to_str(stdout).splitlines() return self._parse_uname_content(content)