diff --git a/dead_mans_switch_client/models/dead_mans_switch_client.py b/dead_mans_switch_client/models/dead_mans_switch_client.py index 6f64f919d..0d7fdf7e9 100644 --- a/dead_mans_switch_client/models/dead_mans_switch_client.py +++ b/dead_mans_switch_client/models/dead_mans_switch_client.py @@ -40,8 +40,12 @@ class DeadMansSwitchClient(models.AbstractModel): for process in processes: if hasattr(process, 'memory_percent'): ram += process.memory_percent() + else: + ram = None if hasattr(process, 'cpu_percent'): cpu += process.cpu_percent() + else: + cpu = None user_count = 0 if 'im_chat.presence' in self.env.registry: user_count = len(self.env['im_chat.presence'].search([