Skip to content

Commit

Permalink
Remove print()
Browse files Browse the repository at this point in the history
  • Loading branch information
tony committed Nov 7, 2020
1 parent 9558f1c commit 5188548
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 31 deletions.
27 changes: 0 additions & 27 deletions tmuxp/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,13 +739,6 @@ def command_shell(
else:
current_pane = util.get_current_pane(server=server)

try:
current_session = session = util.get_session(
server=server, current_pane=current_pane
)
except Exception:
current_session = None

try:
session = util.get_session(
server=server, session_name=session_name, current_pane=current_pane
Expand All @@ -760,26 +753,6 @@ def command_shell(
else:
return

if current_session is not None and current_session.id != session.id:
print('in')
if not detached and (
answer_yes
or click.confirm(
'Switch / attach to %s and run shell from there?'
% click.style(session_name, fg='green'),
default=True,
)
):
if current_session.id != session.id:
session.attached_window.attached_pane.send_keys(
'tmuxp shell', enter=True
)
if 'TMUX' in os.environ:
session.switch_client()
else:
session.attach_session()
return

if current_pane['session_id'] != session.id:
current_pane = None

Expand Down
4 changes: 0 additions & 4 deletions tmuxp/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,10 @@ def get_window(session, window_name=None, current_pane=None):
if not window:
raise exc.TmuxpException('Window not found: %s' % window_name)
elif current_pane is not None:
print('get_window: current_pane')
window = session.find_where({'window_id': current_pane['window_id']})
else:
print('get_window: else')
window = session.list_windows()[0]

print(f'get_window: {window}')

return window


Expand Down

0 comments on commit 5188548

Please sign in to comment.