From 628845b607232dd75ebde895ca0a7ef6e7ea7279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com> Date: Mon, 8 Feb 2021 02:20:27 +0100 Subject: [PATCH] fixup! Add support for CMF 2.3 fix pylint warnings --- .../portal_components/test.erp5.testTemplateTool.py | 5 +++-- .../portal_components/document.erp5.File.py | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.py b/bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.py index 14cf2e0559..a4df1c74c8 100644 --- a/bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.py +++ b/bt5/erp5_forge/TestTemplateItem/portal_components/test.erp5.testTemplateTool.py @@ -148,8 +148,9 @@ class TestTemplateTool(ERP5TypeTestCase): the new bt5 is not installed, only imported. """ self._svn_setup_ssl() - global PropertiesTool - class PropertiesTool(ActionsTool): + # we make this class a global so that it can be pickled + global PropertiesTool # pylint:disable=global-variable-not-assigned + class PropertiesTool(ActionsTool): # pylint:disable=redefined-outer-name id = 'portal_properties' cls = PropertiesTool diff --git a/product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.File.py b/product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.File.py index c48c145f57..f4565fe317 100644 --- a/product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.File.py +++ b/product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.File.py @@ -36,7 +36,7 @@ from erp5.component.document.Document import ConversionError from Products.ERP5Type.Base import Base, removeIContentishInterface from OFS.Image import File as OFS_File from Products.ERP5Type.Utils import deprecated -from cStringIO import StringIO + def _unpackData(data): """ @@ -100,7 +100,6 @@ class File(Document, OFS_File): """ if 'file' in kw: file_object = kw.pop('file') - precondition = kw.get('precondition') filename = getattr(file_object, 'filename', None) # if file field is empty(no file is uploaded), # filename is empty string. -- 2.30.9