Skip to content

Commit 2dd6d6e

Browse files
committed
tweaks to cli and workspacebuilder imports
1 parent 30398bb commit 2dd6d6e

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

tmuxp/cli.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616
import argcomplete
1717
import kaptan
1818

19-
from libtmux import Server
20-
from . import config, exc, log, util, WorkspaceBuilder
19+
from libtmux.server import Server
20+
from libtmux.common import has_required_tmux_version, which
21+
22+
from . import WorkspaceBuilder, config, exc, log, util
2123
from .__about__ import __version__
2224
from ._compat import input, string_types
2325
from .workspacebuilder import freeze
@@ -261,7 +263,7 @@ def load_workspace(config_file, args):
261263
logger.error('%s is empty or parsed no config data' % config_file)
262264
return
263265

264-
util.which('tmux')
266+
which('tmux')
265267

266268
try:
267269
logger.info('Loading %s.' % config_file)
@@ -960,7 +962,7 @@ def main():
960962
)
961963

962964
try:
963-
util.has_required_tmux_version()
965+
has_required_tmux_version()
964966
except exc.TmuxpException as e:
965967
logger.error(e)
966968
sys.exit()

tmuxp/workspacebuilder.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@
1111

1212
import logging
1313

14-
from . import exc
14+
from libtmux.exc import TmuxSessionExists
1515
from libtmux.pane import Pane
1616
from libtmux.server import Server
1717
from libtmux.session import Session
1818
from libtmux.window import Window
19-
from libtmux.exc import TmuxSessionExists
19+
20+
from . import exc
2021
from .util import run_before_script
2122

2223
logger = logging.getLogger(__name__)

0 commit comments

Comments
 (0)