some more Python3 fixes (composer.report, tracking)

This commit is contained in:
Helmut Merz 2024-09-26 16:24:24 +02:00
parent 17fbeb2c2c
commit 33ab512b7f
3 changed files with 7 additions and 43 deletions

View file

@ -105,8 +105,8 @@ class Field(Component):
def getValue(self, row): def getValue(self, row):
value = self.getRawValue(row) value = self.getRawValue(row)
if value is None: if value is None:
return u'' return ''
if isinstance(value, basestring): if isinstance(value, str):
return value return value
return getattr(value, 'title', str(value)) return getattr(value, 'title', str(value))

View file

@ -1,25 +1,6 @@
# # cybertools.tracking.comment.interfaces
# Copyright (c) 2008 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
#
""" """ Interface definitions for comments - discussions - forums.
Interface definitions for comments - discussions - forums.
$Id$
""" """
from zope.interface import Interface, Attribute from zope.interface import Interface, Attribute
@ -55,7 +36,7 @@ class IComment(ITrack):
title=u'Content Type', title=u'Content Type',
description=u'Content type (format) of the text field', description=u'Content type (format) of the text field',
# TODO: provide a source/vocabulary # TODO: provide a source/vocabulary
default='text/restructured', default=b'text/restructured',
required=True) required=True)
def getChildren(sort='default'): def getChildren(sort='default'):

View file

@ -1,23 +1,6 @@
# # cybertools.tracking.interfaces
# Copyright (c) 2014 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
#
""" """ Interface definitions for tracking of user interactions.
Interface definitions for tracking of user interactions.
""" """
from zope.interface import Interface, Attribute from zope.interface import Interface, Attribute