From d135e2c3a99bfd1bd01d1158ec31dbc8dc1c910f Mon Sep 17 00:00:00 2001
From: Giampaolo Rodola <g.rodola@gmail.com>
Date: Sat, 15 Jan 2022 22:21:39 +0100
Subject: [PATCH] fix repr(Error): PID was not shown if PID == 0

Signed-off-by: Giampaolo Rodola <g.rodola@gmail.com>
---
 psutil/_common.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/psutil/_common.py b/psutil/_common.py
index 1e33699c..c94a8378 100644
--- a/psutil/_common.py
+++ b/psutil/_common.py
@@ -289,7 +289,7 @@ class Error(Exception):
             info = {}  # Python 2.6
         for name in attrs:
             value = getattr(self, name, None)
-            if value:
+            if value is not None:
                 info[name] = value
         return info
 
-- 
2.39.0.windows.2

