From 7d6bf530197c7790b3647e5d799c70527f6186d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20Cort=C3=A9z?= Date: Fri, 2 Jan 2015 09:55:27 -0600 Subject: [PATCH] Now it's possible ignore session at strtup --- src/app-configuration.defaults | 1 + src/sessionmanager/sessionManager.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app-configuration.defaults b/src/app-configuration.defaults index bc0f1f43..55ef9ef8 100644 --- a/src/app-configuration.defaults +++ b/src/app-configuration.defaults @@ -1,6 +1,7 @@ [sessions] current_session = string(default="") sessions = list(default=list()) +ignored_sessions = list(default=list()) [app-settings] language = string(default="system") diff --git a/src/sessionmanager/sessionManager.py b/src/sessionmanager/sessionManager.py index 0aa901f3..679c5734 100644 --- a/src/sessionmanager/sessionManager.py +++ b/src/sessionmanager/sessionManager.py @@ -7,6 +7,7 @@ import os import session import manager from config_utils import Configuration +import config class sessionManagerController(object): def __init__(self): @@ -17,7 +18,7 @@ class sessionManagerController(object): sessionsList = [] self.sessions = [] for i in os.listdir(paths.config_path()): - if os.path.isdir(paths.config_path(i)): + if os.path.isdir(paths.config_path(i)) and i not in config.app["sessions"]["ignored_sessions"]: strconfig = "%s/session.conf" % (paths.config_path(i)) config_test = Configuration(strconfig) name = config_test["twitter"]["user_name"]