From ee82ee7b320e6d16858a9354d7bd56d837be950e Mon Sep 17 00:00:00 2001 From: Helmut Merz Date: Tue, 24 Sep 2024 19:24:25 +0200 Subject: [PATCH] composer: some more Python3 fixes --- cybertools/composer/schema/field.py | 8 +++---- cybertools/composer/schema/grid/interfaces.py | 21 ++----------------- 2 files changed, 6 insertions(+), 23 deletions(-) diff --git a/cybertools/composer/schema/field.py b/cybertools/composer/schema/field.py index 6321503..bffcf63 100644 --- a/cybertools/composer/schema/field.py +++ b/cybertools/composer/schema/field.py @@ -405,16 +405,16 @@ class ListFieldInstance(FieldInstance): if isinstance(value, str): return value if value is None: - return u'' - return u'\n'.join(unicode(self.valueFieldInstance.marshall(v)) for v in value) + return '' + return '\n'.join(self.valueFieldInstance.marshall(v) for v in value) #return [self.valueFieldInstance.marshall(v) for v in value] def display(self, value): if not value: - return u'' + return '' if isinstance(value, str): return value - return u' | '.join(unicode(self.valueFieldInstance.display(v)) for v in value) + return ' | '.join(self.valueFieldInstance.display(v) for v in value) def unmarshall(self, value): if isinstance(value, str): diff --git a/cybertools/composer/schema/grid/interfaces.py b/cybertools/composer/schema/grid/interfaces.py index 5fc27e2..90fd657 100644 --- a/cybertools/composer/schema/grid/interfaces.py +++ b/cybertools/composer/schema/grid/interfaces.py @@ -1,23 +1,6 @@ -# -# Copyright (c) 2013 Helmut Merz helmutm@cy55.de -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# +# cybertools.composer.schema.grid.interfaces -""" -Grid field definition. +""" Grid field definition. """ from zope import schema