commit/galaxy-central: 3 new changesets
3 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/dfeca47bd70e/ Changeset: dfeca47bd70e User: dan Date: 2013-05-24 19:59:26 Summary: Unicode fixes for tool parameters Affected #: 1 file diff -r 9a97a7fd23bce7bdc6e7b5faa421b2fba932fd39 -r dfeca47bd70ec4252b2cde76411d1d771dab9dba lib/galaxy/tools/parameters/basic.py --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -7,7 +7,7 @@ from galaxy import config, datatypes, util from galaxy.web import form_builder from galaxy.util.bunch import Bunch -from galaxy.util import string_as_bool, sanitize_param +from galaxy.util import string_as_bool, sanitize_param, unicodify from sanitize import ToolParameterSanitizer import validation, dynamic_options # For BaseURLToolParameter @@ -112,7 +112,9 @@ def to_string( self, value, app ): """Convert a value to a string representation suitable for persisting""" - return str( value ) + if not isinstance( value, basestring ): + value = str( value ) + return unicodify( value ) def to_python( self, value, app ): """Convert a value created with to_string back to an object representation""" @@ -144,13 +146,13 @@ Convert a value to a text representation suitable for displaying to the user """ - return value + return unicodify( value ) def to_param_dict_string( self, value, other_values={} ): """Called via __str__ when used in the Cheetah template""" if value is None: value = "" - else: + elif not isinstance( value, basestring ): value = str( value ) if self.tool is None or self.tool.options.sanitize: if self.sanitizer: https://bitbucket.org/galaxy/galaxy-central/commits/12978bbb5ffa/ Changeset: 12978bbb5ffa Branch: next-stable User: dan Date: 2013-05-24 19:59:26 Summary: Unicode fixes for tool parameters Affected #: 1 file diff -r d57826b9c6052bd6278631228f8ce09ebfbabb98 -r 12978bbb5ffa91743afdf6aed29355843735f96f lib/galaxy/tools/parameters/basic.py --- a/lib/galaxy/tools/parameters/basic.py +++ b/lib/galaxy/tools/parameters/basic.py @@ -7,7 +7,7 @@ from galaxy import config, datatypes, util from galaxy.web import form_builder from galaxy.util.bunch import Bunch -from galaxy.util import string_as_bool, sanitize_param +from galaxy.util import string_as_bool, sanitize_param, unicodify from sanitize import ToolParameterSanitizer import validation, dynamic_options # For BaseURLToolParameter @@ -112,7 +112,9 @@ def to_string( self, value, app ): """Convert a value to a string representation suitable for persisting""" - return str( value ) + if not isinstance( value, basestring ): + value = str( value ) + return unicodify( value ) def to_python( self, value, app ): """Convert a value created with to_string back to an object representation""" @@ -144,13 +146,13 @@ Convert a value to a text representation suitable for displaying to the user """ - return value + return unicodify( value ) def to_param_dict_string( self, value, other_values={} ): """Called via __str__ when used in the Cheetah template""" if value is None: value = "" - else: + elif not isinstance( value, basestring ): value = str( value ) if self.tool is None or self.tool.options.sanitize: if self.sanitizer: https://bitbucket.org/galaxy/galaxy-central/commits/ffa2061034a8/ Changeset: ffa2061034a8 User: dan Date: 2013-05-24 19:59:49 Summary: merge Affected #: 0 files Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.
participants (1)
-
commits-noreply@bitbucket.org