Skip to content

Commit 2c0d406

Browse files
author
Nathan Lee
committed
Added check to parseargs for restart flag to only accept if a restart is possible
1 parent 0b82241 commit 2c0d406

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

pyrunner/core/pyrunner.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,8 @@ def parse_args(self):
325325
elif opt in ['-n', '--max-procs']:
326326
self.config['max_procs'] = int(arg)
327327
elif opt in ['-r', '--restart']:
328-
self._init_params['restart'] = True
328+
if os.path.isfile(self.config.ctllog_file):
329+
self._init_params['restart'] = True
329330
elif opt in ['-x', '--exec-only']:
330331
self._init_params['exec_only_list'] = [ int(id) for id in arg.split(',') ]
331332
elif opt in ['-N', '--norun']:

pyrunner/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '4.0.2'
1+
__version__ = '4.0.3'

0 commit comments

Comments
 (0)