Skip to content

Commit 3fa69dc

Browse files
committed
#27 first part of fix for tmuxp freeze indexError
1 parent b1fd04f commit 3fa69dc

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

tmuxp/cli.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -332,9 +332,16 @@ def command_freeze(args):
332332
colors=args.colors
333333
)
334334

335-
session = t.findWhere({
336-
'session_name': ctext
337-
})
335+
try:
336+
session = t.findWhere({
337+
'session_name': ctext
338+
})
339+
340+
if not session:
341+
raise exc.TmuxpException('Session not found.')
342+
except exc.TmuxpException as e:
343+
print(e)
344+
return
338345

339346
sconf = freeze(session)
340347
configparser = kaptan.Kaptan()

0 commit comments

Comments
 (0)