details: http://www.bx.psu.edu/hg/galaxy/rev/73d8b2acef0a changeset: 2434:73d8b2acef0a user: James Taylor <james@jamestaylor.org> date: Mon Jun 08 16:47:01 2009 -0400 description: Allow UnvalidatedValues to be used when generating output labels (fixes issue #59) 1 file(s) affected in this change: lib/galaxy/tools/parameters/basic.py diffs (38 lines): diff -r 73a8b43f1d97 -r 73d8b2acef0a lib/galaxy/tools/parameters/basic.py --- a/lib/galaxy/tools/parameters/basic.py Mon Jun 08 12:49:26 2009 -0400 +++ b/lib/galaxy/tools/parameters/basic.py Mon Jun 08 16:47:01 2009 -0400 @@ -535,9 +535,10 @@ def from_html( self, value, trans=None, context={} ): if self.need_late_validation( trans, context ): if self.multiple: - #While it is generally allowed that a select value can be '', - #we do not allow this to be the case in a dynamically generated multiple select list being set in workflow building mode - #we instead treat '' as 'No option Selected' (None) + # While it is generally allowed that a select value can be '', + # we do not allow this to be the case in a dynamically + # generated multiple select list being set in workflow building + # mode we instead treat '' as 'No option Selected' (None) if value == '': value = None else: @@ -565,9 +566,9 @@ if isinstance( value, list ): if not(self.repeat): assert self.multiple, "Multiple values provided but parameter is not expecting multiple values" - return self.separator.join( value ) + return self.separator.join( map( str, value ) ) else: - return value + return str(value) def value_to_basic( self, value, app ): if isinstance( value, UnvalidatedValue ): return { "__class__": "UnvalidatedValue", "value": value.value } @@ -1331,6 +1332,8 @@ """ def __init__( self, value ): self.value = value + def __str__( self ): + return str( self.value ) class RuntimeValue( object ): """