aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/users.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/users.py b/src/plugins/users.py
index e5124f0..10e59e5 100644
--- a/src/plugins/users.py
+++ b/src/plugins/users.py
@@ -93,7 +93,10 @@ class Users:
users, rc = {}, []
for tty in ttys:
- attr = os.stat('/dev/' + tty)
+ try:
+ attr = os.stat('/dev/' + tty)
+ except:
+ continue
if ('/' not in tty) and (attr.st_uid == 0):
if not (try_to_find_root and (attr.st_mode == 0o20600)):
continue