Commit 657caeb6 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Preparation of erp5_base migration from FS: Fix pylint...

ZODB Components: Preparation of erp5_base migration from FS: Fix pylint unused-import and unused-variable warnings.
parent b89a5dc7
...@@ -229,7 +229,7 @@ class Coordinate(Base): ...@@ -229,7 +229,7 @@ class Coordinate(Base):
self._writeFromPUT( body ) self._writeFromPUT( body )
RESPONSE.setStatus(204) RESPONSE.setStatus(204)
return RESPONSE return RESPONSE
except ResourceLockedError, msg: except ResourceLockedError:
get_transaction().abort() get_transaction().abort()
RESPONSE.setStatus(423) RESPONSE.setStatus(423)
return RESPONSE return RESPONSE
......
...@@ -29,7 +29,6 @@ from AccessControl import ClassSecurityInfo ...@@ -29,7 +29,6 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type.ERP5Type import ERP5TypeInformation from Products.ERP5Type.ERP5Type import ERP5TypeInformation
from zLOG import LOG
class DeliveryTypeInformation(ERP5TypeInformation): class DeliveryTypeInformation(ERP5TypeInformation):
""" """
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
# #
############################################################################## ##############################################################################
from Products.ERP5.Document.File import File
from Products.ERP5.Document.Image import Image from Products.ERP5.Document.Image import Image
class EmbeddedFile(Image): class EmbeddedFile(Image):
......
...@@ -29,15 +29,7 @@ ...@@ -29,15 +29,7 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5.mixin.builder import BuilderMixin
from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.Document.Amount import Amount
from Products.ERP5.MovementGroup import MovementGroupNode
from Products.ERP5.mixin.builder import BuilderMixin, SelectMethodError
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from DateTime import DateTime
from Acquisition import aq_parent, aq_inner
class GeneratedDeliveryBuilder(BuilderMixin): class GeneratedDeliveryBuilder(BuilderMixin):
""" """
......
...@@ -33,8 +33,6 @@ from Products.ERP5Type.Utils import deprecated ...@@ -33,8 +33,6 @@ from Products.ERP5Type.Utils import deprecated
from Products.ERP5.Document.Coordinate import Coordinate from Products.ERP5.Document.Coordinate import Coordinate
import string
class GeographicAddress(Coordinate): class GeographicAddress(Coordinate):
""" """
A geographic address holds a complete set of A geographic address holds a complete set of
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
############################################################################## ##############################################################################
import os import os
import string
import struct import struct
import subprocess import subprocess
from cStringIO import StringIO from cStringIO import StringIO
...@@ -39,7 +38,6 @@ from cStringIO import StringIO ...@@ -39,7 +38,6 @@ from cStringIO import StringIO
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Acquisition import aq_base from Acquisition import aq_base
from DocumentTemplate.DT_Util import html_quote
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Utils import fill_args_from_request from Products.ERP5Type.Utils import fill_args_from_request
from Products.ERP5.Document.File import File from Products.ERP5.Document.File import File
......
...@@ -85,7 +85,6 @@ class MovementGroup(XMLObject): ...@@ -85,7 +85,6 @@ class MovementGroup(XMLObject):
# By default, we separate movements by _getPropertyDict() values. # By default, we separate movements by _getPropertyDict() values.
# You can override this method in each MovementGroup class. # You can override this method in each MovementGroup class.
tmp_dict = {} tmp_dict = {}
first_property_dict = None
collect_order_group_id = self.getCollectOrderGroupId() collect_order_group_id = self.getCollectOrderGroupId()
for movement in movement_list: for movement in movement_list:
# We are in the case of merging of deliveries, thus if the movement # We are in the case of merging of deliveries, thus if the movement
......
...@@ -30,8 +30,6 @@ import zope.interface ...@@ -30,8 +30,6 @@ import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions, PropertySheet, interfaces
from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.Document.Node import Node from Products.ERP5.Document.Node import Node
class Organisation(Node): class Organisation(Node):
......
...@@ -30,8 +30,7 @@ ...@@ -30,8 +30,7 @@
from zLOG import LOG, BLATHER from zLOG import LOG, BLATHER
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.mixin.builder import BuilderMixin, SelectMethodError from Products.ERP5.mixin.builder import BuilderMixin
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from Products.ERP5Type.CopySupport import CopyError, tryMethodCallWithTemporaryPermission from Products.ERP5Type.CopySupport import CopyError, tryMethodCallWithTemporaryPermission
......
...@@ -32,8 +32,8 @@ from Products.CMFCore.utils import getToolByName ...@@ -32,8 +32,8 @@ from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Utils import deprecated from Products.ERP5Type.Utils import deprecated
from Products.ERP5.Document.Coordinate import Coordinate from Products.ERP5.Document.Coordinate import Coordinate
from Products.ERP5.mixin.url import UrlMixin, no_crawl_protocol_list,\ from Products.ERP5.mixin.url import UrlMixin
no_host_protocol_list, default_protocol_dict
from zLOG import LOG from zLOG import LOG
_marker = object() _marker = object()
......
...@@ -42,7 +42,7 @@ from Products.ERP5Type.Tool.BaseTool import BaseTool ...@@ -42,7 +42,7 @@ from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type.Utils import reencodeUrlEscapes from Products.ERP5Type.Utils import reencodeUrlEscapes
from Products.ERP5 import _dtmldir from Products.ERP5 import _dtmldir
from Products.ERP5.Document.Url import no_crawl_protocol_list from Products.ERP5.mixin.url import no_crawl_protocol_list
from Products.ERP5Type.Utils import fill_args_from_request from Products.ERP5Type.Utils import fill_args_from_request
from AccessControl import Unauthorized from AccessControl import Unauthorized
......
...@@ -34,9 +34,7 @@ from AccessControl import ClassSecurityInfo ...@@ -34,9 +34,7 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type import Permissions, interfaces from Products.ERP5Type import Permissions, interfaces
from Products.ERP5Type.Tool.TypesTool import TypeProvider from Products.ERP5Type.Tool.TypesTool import TypeProvider
from Products.ERP5 import DeliverySolver
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
from Products.CMFCore.utils import getToolByName
class SolverTool(TypeProvider): class SolverTool(TypeProvider):
""" The SolverTool provides API to find out which solver can be applied in """ The SolverTool provides API to find out which solver can be applied in
......
...@@ -204,7 +204,6 @@ class BuilderMixin(XMLObject, Amount, Predicate): ...@@ -204,7 +204,6 @@ class BuilderMixin(XMLObject, Amount, Predicate):
def newMovement(inventory_item, resource): def newMovement(inventory_item, resource):
# Create temporary movement # Create temporary movement
movement = newTempMovement(self.getPortalObject(), "temp") movement = newTempMovement(self.getPortalObject(), "temp")
dumb_movement = inventory_item.getObject()
resource_portal_type = resource.getPortalType() resource_portal_type = resource.getPortalType()
assert resource_portal_type in resource_portal_type_list, \ assert resource_portal_type in resource_portal_type_list, \
"Builder %r does not support resource of type : %r" % ( "Builder %r does not support resource of type : %r" % (
......
...@@ -49,9 +49,9 @@ EMBEDDED_FORMAT = '_embedded' ...@@ -49,9 +49,9 @@ EMBEDDED_FORMAT = '_embedded'
from Products.ERP5.Document.Document import DocumentConversionServerProxy from Products.ERP5.Document.Document import DocumentConversionServerProxy
# Backward compatibility only # Backward compatibility only
from Products.ERP5.Document.Document import DOCUMENT_CONVERSION_SERVER_PROXY_TIMEOUT as OOO_SERVER_PROXY_TIMEOUT from Products.ERP5.Document.Document import DOCUMENT_CONVERSION_SERVER_PROXY_TIMEOUT as OOO_SERVER_PROXY_TIMEOUT # pylint: disable=unused-import
from Products.ERP5.Document.Document import DOCUMENT_CONVERSION_SERVER_RETRY as OOO_SERVER_RETRY from Products.ERP5.Document.Document import DOCUMENT_CONVERSION_SERVER_RETRY as OOO_SERVER_RETRY # pylint: disable=unused-import
from Products.ERP5.Document.Document import global_server_proxy_uri_failure_time from Products.ERP5.Document.Document import global_server_proxy_uri_failure_time # pylint: disable=unused-import
from Products.ERP5.Document.Document import enc, dec from Products.ERP5.Document.Document import enc, dec
OOoServerProxy = DocumentConversionServerProxy OOoServerProxy = DocumentConversionServerProxy
...@@ -172,7 +172,7 @@ class OOoDocument(OOoDocumentExtensibleTraversableMixin, BaseConvertableFileMixi ...@@ -172,7 +172,7 @@ class OOoDocument(OOoDocumentExtensibleTraversableMixin, BaseConvertableFileMixi
" formats for conversion (Code %s: %s)" % ( " formats for conversion (Code %s: %s)" % (
response_code, response_message)) response_code, response_message))
except Fault, f: except Fault:
allowed = server_proxy.getAllowedTargets(content_type) allowed = server_proxy.getAllowedTargets(content_type)
warn('Your oood version is too old, using old method ' warn('Your oood version is too old, using old method '
'getAllowedTargets instead of getAllowedTargetList', 'getAllowedTargets instead of getAllowedTargetList',
...@@ -215,7 +215,7 @@ class OOoDocument(OOoDocumentExtensibleTraversableMixin, BaseConvertableFileMixi ...@@ -215,7 +215,7 @@ class OOoDocument(OOoDocumentExtensibleTraversableMixin, BaseConvertableFileMixi
format, format,
orig_format) orig_format)
try: try:
response_code, response_dict, response_message = generate_result _, response_dict, _ = generate_result
except ValueError: except ValueError:
# This is for backward compatibility with older oood version returning # This is for backward compatibility with older oood version returning
# only response_dict # only response_dict
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment