File tree 1 file changed +18
-3
lines changed
1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -30,13 +30,28 @@ def build_taskfile(function, directory_list=None):
30
30
task .append ('cd ' + directory )
31
31
32
32
if function == 'segment' :
33
- task .append ('segment segment_settings.txt' )
33
+ if os .path .exists (directory + '/segment_settings.txt' ):
34
+ task .append ('segment segment_settings.txt' )
35
+ else :
36
+ print 'Settings file not found in %s. Double check your directory list: %s' % (directory , directory_list )
37
+ continue
34
38
elif function == 'focus' :
35
39
task .append ('focus final' )
40
+
36
41
elif function == '2dmorph' :
37
- task .append ('run2dmorph 2dmorph_settings.txt' )
42
+ if os .path .exists (directory + '/2dmorph_settings.txt' ):
43
+ task .append ('run2dmorph 2dmorph_settings.txt' )
44
+ else :
45
+ print 'Settings file not found in %s. Double check your directory list: %s' % (directory , directory_list )
46
+ continue
47
+
38
48
elif function == '3dmorph' :
39
- task .append ('run3dmorph 3dmorph_settings.txt' )
49
+ if os .path .exists (directory + '/3dmorph_settings.txt' ):
50
+ task .append ('run3dmorph 3dmorph_settings.txt' )
51
+ else :
52
+ print 'Settings file not found in %s. Double check your directory list: %s' % (directory , directory_list )
53
+ continue
54
+
40
55
else :
41
56
sys .exit (1 )
42
57
You can’t perform that action at this time.
0 commit comments