aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/users.py
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-11-22 13:57:27 +0100
committerMattias Andrée <maandree@operamail.com>2014-11-22 13:57:27 +0100
commit6c89af04fbd13d0bf9707bdc0704d1a117f3d05c (patch)
tree1358effd83836f6a2640487c7d6718fbeba70cc2 /src/plugins/users.py
parentfix bug (diff)
downloadxpybar-6c89af04fbd13d0bf9707bdc0704d1a117f3d05c.tar.gz
xpybar-6c89af04fbd13d0bf9707bdc0704d1a117f3d05c.tar.bz2
xpybar-6c89af04fbd13d0bf9707bdc0704d1a117f3d05c.tar.xz
fix race condition + forgot to update dist
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/plugins/users.py')
-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