File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -245,6 +245,9 @@ def subcommand_attach_session(args):
245
245
except IndexError as e :
246
246
print ('Session not found.' )
247
247
return
248
+ except Exception as e :
249
+ print (e .message [0 ])
250
+ return
248
251
249
252
if 'TMUX' in os .environ :
250
253
del os .environ ['TMUX' ]
@@ -260,7 +263,11 @@ def subcommand_kill_session(args):
260
263
ctext = args .session_name [0 ]
261
264
262
265
t = Server ()
263
- sessions = [s for s in t .sessions if s .get ('session_name' ) == ctext ]
266
+ try :
267
+ sessions = [s for s in t .sessions if s .get ('session_name' ) == ctext ]
268
+ except Exception as e :
269
+ print (e .message [0 ])
270
+ return
264
271
265
272
if (len (sessions ) == 1 ):
266
273
try :
@@ -379,10 +386,7 @@ def main():
379
386
380
387
util .oh_my_zsh_auto_title ()
381
388
382
- print (args )
383
- if args .version :
384
- print ('tmuxp %s' % __version__ )
385
- elif args .callback is subcommand_load :
389
+ if args .callback is subcommand_load :
386
390
subcommand_load (args )
387
391
elif args .callback is subcommand_convert :
388
392
subcommand_convert (args )
You can’t perform that action at this time.
0 commit comments