From 11421107e912a06c1532d87335e13bfb1c0f0b52 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Mon, 30 May 2016 15:58:53 -0500 Subject: [PATCH] correct tmux session exceptions, fixes #162 --- tmuxp/cli.py | 6 +++--- tmuxp/exc.py | 7 ------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/tmuxp/cli.py b/tmuxp/cli.py index f220f930c17..b47ee578b4b 100644 --- a/tmuxp/cli.py +++ b/tmuxp/cli.py @@ -15,9 +15,9 @@ import argcomplete import kaptan - -from libtmux.server import Server from libtmux.common import has_required_tmux_version, which +from libtmux.exc import TmuxSessionExists +from libtmux.server import Server from . import WorkspaceBuilder, config, exc, log, util from .__about__ import __version__ @@ -283,7 +283,7 @@ def load_workspace(config_file, args): if not args.detached: builder.session.attach_session() - except exc.TmuxSessionExists as e: + except TmuxSessionExists as e: if not args.detached and ( args.answer_yes or prompt_yes_no('%s Attach?' % e) ): diff --git a/tmuxp/exc.py b/tmuxp/exc.py index 06e5316932f..0c9061d0265 100644 --- a/tmuxp/exc.py +++ b/tmuxp/exc.py @@ -17,13 +17,6 @@ class TmuxpException(Exception): """Base Exception for Tmuxp Errors.""" -class TmuxSessionExists(TmuxpException): - - """Session does not exist in the server.""" - - pass - - class ConfigError(TmuxpException): """Error parsing tmuxp configuration dict."""