From 22f9b7a66ab4a3f5d3927e429912237df2a3aa15 Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 27 Oct 2014 19:00:38 +0100 Subject: Prevent a (harmless) traceback while generating the documentation --- plugins/screen_detach.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/screen_detach.py b/plugins/screen_detach.py index 3552a179..53827c11 100644 --- a/plugins/screen_detach.py +++ b/plugins/screen_detach.py @@ -7,15 +7,14 @@ import os import stat import pyinotify -SCREEN_DIR = '/var/run/screen/S-%s' % (os.getlogin(),) - class Plugin(BasePlugin): def init(self): + screen_dir = '/var/run/screen/S-%s' % (os.getlogin(),) self.timed_event = None sock_path = None self.thread = None - for f in os.listdir(SCREEN_DIR): - path = os.path.join(SCREEN_DIR, f) + for f in os.listdir(screen_dir): + path = os.path.join(screen_dir, f) if screen_attached(path): sock_path = path self.attached = True -- cgit v1.2.3