Skip to content

Commit 70031c3

Browse files
authored
Merge pull request #3153 from MRtrix3/run_command_fix_continue_pathlib
run.command(): Fix operation of -continue
2 parents af5daaa + 3d34d7a commit 70031c3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

python/mrtrix3/run.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,9 @@ def trigger_continue(self, entries):
124124
for entry in entries:
125125
# It's possible that the file might be defined in a '--option=XXX' style argument
126126
# It's also possible that the filename in the command string has the file extension omitted
127-
if entry.startswith('--') and '=' in entry:
128-
totest = entry.split('=')[1]
129-
else:
130-
totest = entry
127+
totest = entry.split('=')[1] \
128+
if isinstance(entry, str) and entry.startswith('--') and '=' in entry \
129+
else entry
131130
if totest in [ self._last_file, os.path.splitext(self._last_file)[0] ]:
132131
self._last_file = ''
133132
return True

0 commit comments

Comments
 (0)