Add a few more comments about dataset path rewriting in the dataset wrapper.

This commit is contained in:
John Chilton
2014-06-19 23:21:42 -05:00
parent 5a7a13b48e
commit c080f8e441
+8
View File
@@ -209,13 +209,21 @@ class DatasetFilenameWrapper( ToolParameterValueWrapper ):
def __getattr__( self, key ):
if self.false_path is not None and key == 'file_name':
# Path to dataset was rewritten for this job.
return self.false_path
elif self.false_extra_files_path is not None and key == 'extra_files_path':
# Path to extra files was rewritten for this job.
return self.false_extra_files_path
elif key == 'extra_files_path':
try:
# Assume it is an output and that this wrapper
# will be set with correct "files_path" for this
# job.
return self.files_path
except AttributeError:
# Otherwise, we have an input - delegate to model and
# object store to find the static location of this
# directory.
try:
return self.dataset.extra_files_path
except exceptions.ObjectNotFound: