#NEWLINE# def load_sessions( ) : #NEWLINE# #INDENT# 'load sessions information ' #NEWLINE# LOG . debug ( 'Backup tmux sessions...' ) #NEWLINE# if ( not cmd . has_tmux_server ( ) ) : #NEWLINE# #INDENT# LOG . info ( 'No tmux session found, nothing to backup' ) #NEWLINE# sys . exit ( 0 ) #NEWLINE# #UNINDENT# output = cmd . get_sessions ( ) #NEWLINE# sess = [ ] #NEWLINE# for s in output : #NEWLINE# #INDENT# s_l = s . split ( config . SEP ) #NEWLINE# session = tmux_obj . Session ( s_l [ 0 ] ) #NEWLINE# session . size = eval ( s_l [ 1 ] ) #NEWLINE# session . attached = ( int ( s_l [ 2 ] ) > 0 ) #NEWLINE# session . windows = load_windows ( session . name ) #NEWLINE# sess . append ( session ) #NEWLINE# #UNINDENT# return sess