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