|
10 | 10 |
|
11 | 11 | from libtmux._internal.query_list import ObjectDoesNotExist |
12 | 12 | from libtmux.common import has_lt_version |
13 | | -from libtmux.exc import TmuxSessionExists |
14 | 13 | from libtmux.pane import Pane |
15 | 14 | from libtmux.server import Server |
16 | 15 | from libtmux.session import Session |
@@ -164,7 +163,7 @@ def __init__( |
164 | 163 | """ |
165 | 164 |
|
166 | 165 | if not sconf: |
167 | | - raise exc.EmptyWorkspaceException("session configuration is empty.") |
| 166 | + raise exc.EmptyWorkspaceException("Session configuration is empty.") |
168 | 167 |
|
169 | 168 | # validation.validate_schema(sconf) |
170 | 169 |
|
@@ -231,22 +230,6 @@ def build(self, session: t.Optional[Session] = None, append: bool = False) -> No |
231 | 230 | "WorkspaceBuilder.build requires server to be passed " |
232 | 231 | + "on initialization, or pass in session object to here." |
233 | 232 | ) |
234 | | - |
235 | | - if self.server.has_session(self.sconf["session_name"]): |
236 | | - try: |
237 | | - session = self.server.sessions.get( |
238 | | - session_name=self.sconf["session_name"] |
239 | | - ) |
240 | | - assert session is not None |
241 | | - assert isinstance(session, Session) |
242 | | - self._session = session |
243 | | - |
244 | | - raise TmuxSessionExists( |
245 | | - "Session name %s is already running." |
246 | | - % self.sconf["session_name"] |
247 | | - ) |
248 | | - except ObjectDoesNotExist: |
249 | | - pass |
250 | 233 | else: |
251 | 234 | new_session_kwargs = {} |
252 | 235 | if "start_directory" in self.sconf: |
|
0 commit comments