(sessionId = 0)
| 88 | return ckptRetVal == 2 |
| 89 | |
| 90 | def restore(sessionId = 0): |
| 91 | if sessionId == 0: |
| 92 | if len(sessionList) == 0: |
| 93 | createSessionList() |
| 94 | if len(sessionList) == 0: |
| 95 | print('No checkpoint session found') |
| 96 | return |
| 97 | print('Restoring the latest session') |
| 98 | else: |
| 99 | if len(sessionList) == 0: |
| 100 | print('Please do a listSession to see the list of available sessions') |
| 101 | return |
| 102 | if sessionId < 1 or sessionId > len(sessionList): |
| 103 | return 'Invalid session id' |
| 104 | |
| 105 | session = sessionList[sessionId - 1] |
| 106 | os.execlp('dmtcp_nocheckpoint', 'sh', session[1]) |
| 107 | |
| 108 | |
| 109 | def createSessionList(): |
nothing calls this directly
no test coverage detected