diff --git a/py3status/modules/arch_updates.py b/py3status/modules/arch_updates.py index 089bdf4538..aa133cd7a2 100644 --- a/py3status/modules/arch_updates.py +++ b/py3status/modules/arch_updates.py @@ -98,8 +98,9 @@ def _get_yay_updates(self): try: updates = self.py3.command_output(["yay", "-Qua"]) return len(updates.splitlines()) - except self.py3.CommandError: - return None + except self.py3.CommandError as ce: + # yay returns 1 if there are no updates. + return 0 if ce.error_code == 1 else None def _get_paru_updates(self): try: