@@ -40,8 +40,11 @@ def pick(filename, directory=None):
40
40
"""
41
41
if directory is None :
42
42
directory = utils .get_undecorated_calling_module ()
43
- # Remove the CWD and the anticipated '/' from the front of the module
44
- directory = directory [len (os .getcwd ()) + 1 :]
43
+ # If the 'cwd' is not '/output' (which indicates we're in a Container)
44
+ # then remove the CWD and the anticipated '/'
45
+ # from the front of the module
46
+ if os .getcwd () not in ['/output' ]:
47
+ directory = directory [len (os .getcwd ()) + 1 :]
45
48
46
49
file_path = os .path .join (directory , filename )
47
50
return file_path if os .path .isfile (file_path ) else None
@@ -65,8 +68,11 @@ def pick_sdf(filename, directory=None):
65
68
"""
66
69
if directory is None :
67
70
directory = utils .get_undecorated_calling_module ()
68
- # Remove the CWD and the anticipated '/' from the front of the module
69
- directory = directory [len (os .getcwd ()) + 1 :]
71
+ # If the 'cwd' is not '/output' (which indicates we're in a Container)
72
+ # then remove the CWD and the anticipated '/'
73
+ # from the front of the module
74
+ if os .getcwd () not in ['/output' ]:
75
+ directory = directory [len (os .getcwd ()) + 1 :]
70
76
71
77
file_path = os .path .join (directory , filename )
72
78
if os .path .isfile (file_path + '.sdf.gz' ):
0 commit comments