@@ -40,8 +40,11 @@ def pick(filename, directory=None):
4040 """
4141 if directory is None :
4242 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 :]
4548
4649 file_path = os .path .join (directory , filename )
4750 return file_path if os .path .isfile (file_path ) else None
@@ -65,8 +68,11 @@ def pick_sdf(filename, directory=None):
6568 """
6669 if directory is None :
6770 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 :]
7076
7177 file_path = os .path .join (directory , filename )
7278 if os .path .isfile (file_path + '.sdf.gz' ):
0 commit comments