Skip to content

Commit 52e2f4f

Browse files
committed
remove unused param in Server.attach_session
1 parent 0814211 commit 52e2f4f

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

CHANGES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ Changelog
44

55
Here you can find the recent changes to libtmux
66

7+
- :release:`0.6.0 <2016-09-16>`
8+
- :bug:`-` Remove unused ``target_sesssion`` param in
9+
``Server.attach_session``.
10+
711
- :release:`0.5.1 <2016-08-18>`
812
- :bug:`12` - fix logger message when tmux doesn't exist in ``PATH``
913

libtmux/session.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,8 @@ def cmd(self, *args, **kwargs):
7575
kwargs['-t'] = self.id
7676
return self.server.cmd(*args, **kwargs)
7777

78-
def attach_session(self, target_session=None):
79-
"""Return ``$ tmux attach-session`` aka alias: ``$ tmux attach``.
80-
81-
:param: target_session: str. name of the session. fnmatch(3) works.
82-
83-
"""
78+
def attach_session(self):
79+
"""Return ``$ tmux attach-session`` aka alias: ``$ tmux attach``."""
8480
proc = self.cmd('attach-session', '-t%s' % self.id)
8581

8682
if proc.stderr:
@@ -112,6 +108,10 @@ def rename_session(self, new_name):
112108
:rtype: :class:`Session`
113109
114110
"""
111+
if '.' in new_name:
112+
raise exc.BadSessionName(
113+
'tmux does not allowed in session names: %s' % new_name)
114+
115115
proc = self.cmd(
116116
'rename-session',
117117
'-t%s' % self.id,

0 commit comments

Comments
 (0)