Commit b5200bc2 authored by Gabriel Monnerat's avatar Gabriel Monnerat

ERP5: remove unused imports and follow PEP8

parent 47e57367
...@@ -27,7 +27,6 @@ ...@@ -27,7 +27,6 @@
import os import os
from string import zfill from string import zfill
from urllib import urlencode
import tempfile import tempfile
from DateTime import DateTime from DateTime import DateTime
from zLOG import LOG from zLOG import LOG
......
...@@ -27,7 +27,9 @@ ...@@ -27,7 +27,9 @@
# #
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5Type import interfaces
from Products.ERP5.Document.Delivery import Delivery from Products.ERP5.Document.Delivery import Delivery
......
...@@ -29,7 +29,9 @@ ...@@ -29,7 +29,9 @@
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5Type import interfaces
from Products.ERP5.Document.Movement import Movement from Products.ERP5.Document.Movement import Movement
......
...@@ -28,7 +28,9 @@ ...@@ -28,7 +28,9 @@
from Globals import InitializeClass from Globals import InitializeClass
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions, PropertySheet, Constraint from Products.ERP5Type import Constraint
from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5.Document.PDFTypeInformation import PDFTypeInformation from Products.ERP5.Document.PDFTypeInformation import PDFTypeInformation
from Products.ERP5Type.Core.ActionInformation import CacheableAction from Products.ERP5Type.Core.ActionInformation import CacheableAction
......
...@@ -33,7 +33,9 @@ from Products.CMFCore.exceptions import AccessControl_Unauthorized ...@@ -33,7 +33,9 @@ from Products.CMFCore.exceptions import AccessControl_Unauthorized
#from Products.ERP5.Core.Node import Node #from Products.ERP5.Core.Node import Node
from Products.ERP5Type import Permissions, PropertySheet, Constraint from Products.ERP5Type import Constraint
from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
class Person(Person): class Person(Person):
""" """
......
...@@ -25,14 +25,20 @@ ...@@ -25,14 +25,20 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# #
############################################################################## ##############################################################################
from PIL import ImageFont, Image, ImageDraw, ImageFilter from PIL import Image
from random import randrange, uniform from PIL import ImageDraw
from string import zfill from PIL import ImageFilter
from PIL import ImageFont
from random import uniform
from hashlib import md5 from hashlib import md5
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile
import sys, os import os
import commands import commands
from zLOG import LOG, TRACE, WARNING, ERROR, INFO from zLOG import ERROR
from zLOG import INFO
from zLOG import LOG
from zLOG import TRACE
from zLOG import WARNING
FONT_FILE = '/usr/share/fonts/TTF/dejavu/DejaVuSansMono.ttf' FONT_FILE = '/usr/share/fonts/TTF/dejavu/DejaVuSansMono.ttf'
INITIAL_FONT_SIZE = 250 INITIAL_FONT_SIZE = 250
......
...@@ -31,7 +31,9 @@ ...@@ -31,7 +31,9 @@
from Testing import ZopeTestCase from Testing import ZopeTestCase
from Products import ERP5Security from Products import ERP5Security
from Products import PluggableAuthService from Products import PluggableAuthService
from zLOG import LOG, WARNING, INFO from zLOG import INFO
from zLOG import LOG
from zLOG import WARNING
from Products.ERP5eGovSecurity.EGOVUserManager import addEGOVUserManager from Products.ERP5eGovSecurity.EGOVUserManager import addEGOVUserManager
from Products.ERP5eGovSecurity.EGOVGroupManager import addEGOVGroupManager from Products.ERP5eGovSecurity.EGOVGroupManager import addEGOVGroupManager
......
...@@ -184,7 +184,6 @@ class PayzenService(XMLObject, PayzenSOAP): ...@@ -184,7 +184,6 @@ class PayzenService(XMLObject, PayzenSOAP):
) )
def initialize(self, REQUEST=None, **kw): def initialize(self, REQUEST=None, **kw):
"""See Payment Service Interface Documentation""" """See Payment Service Interface Documentation"""
pass
def _getSignature(self, ob, sorted_key_list): def _getSignature(self, ob, sorted_key_list):
"""Calculates signature from ob """Calculates signature from ob
......
...@@ -26,10 +26,14 @@ ...@@ -26,10 +26,14 @@
# #
############################################################################## ##############################################################################
import sys, os import os
import commands import commands
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile
from zLOG import LOG, TRACE, WARNING, ERROR, INFO from zLOG import ERROR
from zLOG import INFO
from zLOG import LOG
from zLOG import TRACE
from zLOG import WARNING
def printFile(printer_name, file_path_to_print, use_ps_file=True, nb_copy=1): def printFile(printer_name, file_path_to_print, use_ps_file=True, nb_copy=1):
''' '''
......
...@@ -26,7 +26,11 @@ ...@@ -26,7 +26,11 @@
# #
############################################################################## ##############################################################################
from zLOG import LOG, TRACE, WARNING, ERROR, INFO from zLOG import ERROR
from zLOG import INFO
from zLOG import LOG
from zLOG import TRACE
from zLOG import WARNING
import commands import commands
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile
from Products.ERP5.Document.File import _unpackData from Products.ERP5.Document.File import _unpackData
......
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
from DateTime import DateTime from DateTime import DateTime
import urllib2 import urllib2
from lxml import etree from lxml import etree
import re
from zLOG import LOG from zLOG import LOG
......
from Products.ERP5.Document.Image import Image from Products.ERP5.Document.Image import Image
from zLOG import LOG,INFO,ERROR,WARNING from zLOG import LOG
from zLOG import ERROR
from zLOG import INFO
from zLOG import WARNING
class TileImage(Image): class TileImage(Image):
""" """
......
from Products.ERP5.Document.Image import Image from Products.ERP5.Document.Image import Image
from zLOG import LOG,INFO,ERROR,WARNING from zLOG import LOG
from zLOG import ERROR
from zLOG import INFO
from zLOG import WARNING
class TileImageTransformed(Image): class TileImageTransformed(Image):
......
...@@ -16,17 +16,21 @@ ...@@ -16,17 +16,21 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
import os, sys, shutil, tempfile import os
import tempfile
from cStringIO import StringIO from cStringIO import StringIO
from zLOG import LOG,ERROR,INFO,WARNING from zLOG import LOG
from zLOG import ERROR
from zLOG import INFO
from zLOG import WARNING
from OFS.Image import File, Image from OFS.Image import File, Image
import os, transaction import os, transaction
from AccessControl import getSecurityManager, ClassSecurityInfo from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager
from Globals import package_home from Globals import package_home
import PIL.Image as PIL_Image import PIL.Image as PIL_Image
import thread import thread
import random import random
import base64
from OFS.Folder import Folder from OFS.Folder import Folder
class ZoomifyBase: class ZoomifyBase:
...@@ -45,7 +49,6 @@ class ZoomifyBase: ...@@ -45,7 +49,6 @@ class ZoomifyBase:
def openImage(self): def openImage(self):
""" load the image data """ """ load the image data """
pass
return return
def getImageInfo(self): def getImageInfo(self):
...@@ -92,7 +95,6 @@ class ZoomifyBase: ...@@ -92,7 +95,6 @@ class ZoomifyBase:
def createDataContainer(self, imageName): def createDataContainer(self, imageName):
""" create a container for tile groups and tile metadata """ """ create a container for tile groups and tile metadata """
pass
return return
def getAssignedTileContainerName(self, tileFileName=None): def getAssignedTileContainerName(self, tileFileName=None):
...@@ -113,7 +115,6 @@ class ZoomifyBase: ...@@ -113,7 +115,6 @@ class ZoomifyBase:
def createTileContainer(self, tileContainerName=None): def createTileContainer(self, tileContainerName=None):
""" create a container for the next group of tiles within the data container """ """ create a container for the next group of tiles within the data container """
pass
return return
def getTileFileName(self, scaleNumber, columnNumber, rowNumber): def getTileFileName(self, scaleNumber, columnNumber, rowNumber):
...@@ -124,7 +125,6 @@ class ZoomifyBase: ...@@ -124,7 +125,6 @@ class ZoomifyBase:
def getFileReference(self, scaleNumber, columnNumber, rowNumber): def getFileReference(self, scaleNumber, columnNumber, rowNumber):
""" get the full path of the file the tile will be saved as """ """ get the full path of the file the tile will be saved as """
pass
return return
def getNumberOfTiles(self): def getNumberOfTiles(self):
...@@ -147,13 +147,11 @@ class ZoomifyBase: ...@@ -147,13 +147,11 @@ class ZoomifyBase:
def saveXMLOutput(self): def saveXMLOutput(self):
""" save xml metadata about the tiles """ """ save xml metadata about the tiles """
pass
return return
def saveTile(self, image, scaleNumber, column, row): def saveTile(self, image, scaleNumber, column, row):
""" save the cropped region """ """ save the cropped region """
pass
return return
def processImage(self): def processImage(self):
...@@ -272,7 +270,6 @@ class ZoomifyBase: ...@@ -272,7 +270,6 @@ class ZoomifyBase:
def ZoomifyProcess(self, imageNames): def ZoomifyProcess(self, imageNames):
""" the method the client calls to generate zoomify metadata """ """ the method the client calls to generate zoomify metadata """
pass
return return
def preProcess(self): def preProcess(self):
...@@ -455,7 +452,6 @@ class ZoomifyZopeProcessor(ZoomifyBase): ...@@ -455,7 +452,6 @@ class ZoomifyZopeProcessor(ZoomifyBase):
return return
def saveTransformedFile(self): def saveTransformedFile(self):
pass
return return
def _ZoomifyProcess(self): def _ZoomifyProcess(self):
...@@ -495,12 +491,10 @@ class ERP5ZoomifyZopeProcessor(ZoomifyZopeProcessor): ...@@ -495,12 +491,10 @@ class ERP5ZoomifyZopeProcessor(ZoomifyZopeProcessor):
def createDefaultViewer(self): def createDefaultViewer(self):
""" add the default Zoomify viewer to the Zoomify metadata """ """ add the default Zoomify viewer to the Zoomify metadata """
pass
return return
def createDataContainer(self, imageName="None"): def createDataContainer(self, imageName="None"):
"""Creates nothing coz we are already in the container""" """Creates nothing coz we are already in the container"""
pass
return return
def _updateTransformedFile(self,tile_group_id,tile_title): def _updateTransformedFile(self,tile_group_id,tile_title):
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5.Document.Item import Item from Products.ERP5.Document.Item import Item
from Products.ERP5.Document.TextDocument import TextDocument from Products.ERP5.Document.TextDocument import TextDocument
......
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from DateTime import DateTime from DateTime import DateTime
from zLOG import LOG,INFO,ERROR from zLOG import LOG
from zLOG import ERROR
from zLOG import INFO
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
......
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from DateTime import DateTime from DateTime import DateTime
from zLOG import LOG,INFO,ERROR from zLOG import LOG
from zLOG import ERROR
from zLOG import INFO
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
......
...@@ -28,11 +28,14 @@ ...@@ -28,11 +28,14 @@
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.ERP5Type.XMLObject import XMLObject
from Products.ERP5TioSafe.Utils import EchoDictTarget, NewEchoDictTarget from Products.ERP5TioSafe.Utils import EchoDictTarget
from Products.ERP5TioSafe.Utils import NewEchoDictTarget
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
from App.Extensions import getBrain from App.Extensions import getBrain
from lxml import etree from lxml import etree
from zLOG import LOG, ERROR, INFO from zLOG import ERROR
from zLOG import INFO
from zLOG import LOG
from Products.ERP5Type.Tool.WebServiceTool import ConnectionError from Products.ERP5Type.Tool.WebServiceTool import ConnectionError
from Products.ERP5Type.Cache import CachingMethod from Products.ERP5Type.Cache import CachingMethod
......
...@@ -682,7 +682,6 @@ class Transaction(TioSafeBrain): ...@@ -682,7 +682,6 @@ class Transaction(TioSafeBrain):
300, 300,
'resource_id = %s, remains %s' % (resource_id, resource_gid), 'resource_id = %s, remains %s' % (resource_id, resource_gid),
) )
pass
# through the type render the delivery or the discount # through the type render the delivery or the discount
if line_type == 'Discount': if line_type == 'Discount':
resource = integration_site.getSourceCarrierValue() resource = integration_site.getSourceCarrierValue()
......
...@@ -28,10 +28,12 @@ ...@@ -28,10 +28,12 @@
############################################################################## ##############################################################################
from App.Extensions import getBrain from App.Extensions import getBrain
from Acquisition import Explicit, aq_base from Acquisition import Explicit
from Acquisition import aq_base
from lxml import etree from lxml import etree
from zLOG import LOG, ERROR, INFO from zLOG import ERROR
from base64 import b16encode, b16decode from zLOG import INFO
from zLOG import LOG
SEPARATOR = '\n' SEPARATOR = '\n'
......
...@@ -28,10 +28,12 @@ ...@@ -28,10 +28,12 @@
############################################################################## ##############################################################################
from App.Extensions import getBrain from App.Extensions import getBrain
from Acquisition import Explicit, aq_base from Acquisition import Explicit
from Acquisition import aq_base
from lxml import etree from lxml import etree
from zLOG import LOG, ERROR, INFO from zLOG import ERROR
from base64 import b16encode, b16decode from zLOG import INFO
from zLOG import LOG
SEPARATOR = '\n' SEPARATOR = '\n'
......
...@@ -28,10 +28,12 @@ ...@@ -28,10 +28,12 @@
############################################################################## ##############################################################################
from App.Extensions import getBrain from App.Extensions import getBrain
from Acquisition import Explicit, aq_base from Acquisition import Explicit
from Acquisition import aq_base
from lxml import etree from lxml import etree
from zLOG import LOG, ERROR, INFO from zLOG import ERROR
from base64 import b16encode, b16decode from zLOG import INFO
from zLOG import LOG
SEPARATOR = '\n' SEPARATOR = '\n'
......
...@@ -28,10 +28,12 @@ ...@@ -28,10 +28,12 @@
############################################################################## ##############################################################################
from App.Extensions import getBrain from App.Extensions import getBrain
from Acquisition import Explicit, aq_base from Acquisition import Explicit
from Acquisition import aq_base
from lxml import etree from lxml import etree
from zLOG import LOG, ERROR, INFO from zLOG import ERROR
from base64 import b16encode, b16decode from zLOG import INFO
from zLOG import LOG
SEPARATOR = '\n' SEPARATOR = '\n'
......
...@@ -28,10 +28,12 @@ ...@@ -28,10 +28,12 @@
############################################################################## ##############################################################################
from App.Extensions import getBrain from App.Extensions import getBrain
from Acquisition import Explicit, aq_base from Acquisition import Explicit
from Acquisition import aq_base
from lxml import etree from lxml import etree
from zLOG import LOG, ERROR, INFO from zLOG import ERROR
from base64 import b16encode, b16decode from zLOG import INFO
from zLOG import LOG
SEPARATOR = '\n' SEPARATOR = '\n'
......
...@@ -28,10 +28,13 @@ ...@@ -28,10 +28,13 @@
############################################################################## ##############################################################################
from App.Extensions import getBrain from App.Extensions import getBrain
from Acquisition import Explicit, aq_base from Acquisition import Explicit
from Acquisition import aq_base
from lxml import etree from lxml import etree
from zLOG import LOG, ERROR, INFO from zLOG import ERROR
from base64 import b16encode, b16decode from zLOG import INFO
from zLOG import LOG
from base64 import b16encode
SEPARATOR = '\n' SEPARATOR = '\n'
...@@ -223,7 +226,6 @@ class MagentoTransaction(MagentoBrain): ...@@ -223,7 +226,6 @@ class MagentoTransaction(MagentoBrain):
300, 300,
'resource_id = %s, remains %s' % (resource_id, resource_gid), 'resource_id = %s, remains %s' % (resource_id, resource_gid),
) )
pass
# through the type render the delivery or the discount # through the type render the delivery or the discount
if line_type == 'Discount': if line_type == 'Discount':
resource = integration_site.getSourceCarrierValue() resource = integration_site.getSourceCarrierValue()
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
from lxml import etree from lxml import etree
from cStringIO import StringIO from cStringIO import StringIO
from zLOG import LOG, ERROR from zLOG import ERROR
from zLOG import LOG
from Acquisition import aq_base from Acquisition import aq_base
import transaction import transaction
from DateTime import DateTime from DateTime import DateTime
...@@ -53,7 +54,10 @@ class MagentoTestConnector: ...@@ -53,7 +54,10 @@ class MagentoTestConnector:
return root return root
def getPropertySheetDefinitionList(self, object): def getPropertySheetDefinitionList(self, object):
from Products.ERP5Type import interfaces, Constraint, Permissions, PropertySheet from Products.ERP5Type import Constraint
from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5Type import interfaces
prop_list = [] prop_list = []
for property_sheet_name in object.getTypeInfo().getTypePropertySheetList(): for property_sheet_name in object.getTypeInfo().getTypePropertySheetList():
if "Magento" in property_sheet_name: if "Magento" in property_sheet_name:
......
...@@ -28,10 +28,12 @@ ...@@ -28,10 +28,12 @@
############################################################################## ##############################################################################
from App.Extensions import getBrain from App.Extensions import getBrain
from Acquisition import Explicit, aq_base from Acquisition import Explicit
from Acquisition import aq_base
from lxml import etree from lxml import etree
from zLOG import LOG, ERROR, INFO from zLOG import ERROR
from base64 import b16encode, b16decode from zLOG import INFO
from zLOG import LOG
SEPARATOR = '\n' SEPARATOR = '\n'
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
from Products.ERP5TioSafe.Conduit.TioSafeBaseConduit import TioSafeBaseConduit from Products.ERP5TioSafe.Conduit.TioSafeBaseConduit import TioSafeBaseConduit
from Products.ERP5SyncML.SyncMLConstant import XUPDATE_INSERT_OR_ADD_LIST from Products.ERP5SyncML.SyncMLConstant import XUPDATE_INSERT_OR_ADD_LIST
from base64 import b16encode from base64 import b16encode
from zLOG import LOG, WARNING from zLOG import LOG
from zLOG import WARNING
from copy import deepcopy from copy import deepcopy
class OscommerceERP5TransactionConduit(TioSafeBaseConduit): class OscommerceERP5TransactionConduit(TioSafeBaseConduit):
......
...@@ -28,9 +28,12 @@ ...@@ -28,9 +28,12 @@
############################################################################## ##############################################################################
from App.Extensions import getBrain from App.Extensions import getBrain
from Acquisition import Explicit, aq_base from Acquisition import Explicit
from Acquisition import aq_base
from lxml import etree from lxml import etree
from zLOG import LOG, ERROR, INFO from zLOG import ERROR
from zLOG import INFO
from zLOG import LOG
from base64 import b16encode, b16decode from base64 import b16encode, b16decode
SEPARATOR = '\n' SEPARATOR = '\n'
......
...@@ -90,7 +90,6 @@ class SalesforceNodeBrain(SalesforceBrain): ...@@ -90,7 +90,6 @@ class SalesforceNodeBrain(SalesforceBrain):
check_list = [getattr(self, tag, None) for tag in tag_list] check_list = [getattr(self, tag, None) for tag in tag_list]
if None in check_list: if None in check_list:
LOG("Can not set address, %s doesn't provided full elements" % self.title, 300, "") LOG("Can not set address, %s doesn't provided full elements" % self.title, 300, "")
pass
else: else:
address = etree.SubElement(node, 'address') address = etree.SubElement(node, 'address')
self._setTagList(self, address, tag_list) self._setTagList(self, address, tag_list)
......
...@@ -28,9 +28,12 @@ ...@@ -28,9 +28,12 @@
############################################################################## ##############################################################################
from App.Extensions import getBrain from App.Extensions import getBrain
from Acquisition import Explicit, aq_base from Acquisition import Explicit
from Acquisition import aq_base
from lxml import etree from lxml import etree
from zLOG import LOG, ERROR, INFO from zLOG import ERROR
from zLOG import INFO
from zLOG import LOG
from base64 import b16encode, b16decode from base64 import b16encode, b16decode
SEPARATOR = '\n' SEPARATOR = '\n'
......
...@@ -36,8 +36,9 @@ from Products.ERP5SyncML.SyncMLConstant import XUPDATE_ELEMENT,\ ...@@ -36,8 +36,9 @@ from Products.ERP5SyncML.SyncMLConstant import XUPDATE_ELEMENT,\
XUPDATE_INSERT_OR_ADD_LIST, XUPDATE_DEL, XUPDATE_UPDATE XUPDATE_INSERT_OR_ADD_LIST, XUPDATE_DEL, XUPDATE_UPDATE
from DateTime import DateTime from DateTime import DateTime
from lxml import etree from lxml import etree
from zLOG import LOG, INFO, ERROR from zLOG import ERROR
from base64 import b16encode from zLOG import INFO
from zLOG import LOG
DEBUG=False DEBUG=False
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
from Products.ERP5TioSafe.Conduit.TioSafeResourceConduit import TioSafeResourceConduit from Products.ERP5TioSafe.Conduit.TioSafeResourceConduit import TioSafeResourceConduit
from Products.ERP5Type.Utils import cartesianProduct from Products.ERP5Type.Utils import cartesianProduct
from lxml import etree from lxml import etree
from zLOG import LOG, INFO from zLOG import INFO
from zLOG import LOG
class UbercartResourceConduit(TioSafeResourceConduit): class UbercartResourceConduit(TioSafeResourceConduit):
""" """
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
from Products.ERP5TioSafe.Conduit.TioSafeBaseConduit import TioSafeBaseConduit from Products.ERP5TioSafe.Conduit.TioSafeBaseConduit import TioSafeBaseConduit
from Products.ERP5SyncML.SyncMLConstant import XUPDATE_INSERT_OR_ADD_LIST from Products.ERP5SyncML.SyncMLConstant import XUPDATE_INSERT_OR_ADD_LIST
from base64 import b16encode from base64 import b16encode
from zLOG import LOG, WARNING from zLOG import LOG
from zLOG import WARNING
from copy import deepcopy from copy import deepcopy
class ERP5TransactionConduit(TioSafeBaseConduit): class ERP5TransactionConduit(TioSafeBaseConduit):
......
...@@ -27,7 +27,9 @@ ...@@ -27,7 +27,9 @@
from lxml import etree from lxml import etree
from cStringIO import StringIO from cStringIO import StringIO
from zLOG import LOG, INFO, ERROR from zLOG import ERROR
from zLOG import INFO
from zLOG import LOG
from Acquisition import aq_base from Acquisition import aq_base
import transaction import transaction
from DateTime import DateTime from DateTime import DateTime
......
...@@ -29,9 +29,12 @@ ...@@ -29,9 +29,12 @@
############################################################################## ##############################################################################
from App.Extensions import getBrain from App.Extensions import getBrain
from Acquisition import Explicit, aq_base from Acquisition import Explicit
from Acquisition import aq_base
from lxml import etree from lxml import etree
from zLOG import LOG, ERROR, INFO from zLOG import ERROR
from zLOG import INFO
from zLOG import LOG
from base64 import b16encode, b16decode from base64 import b16encode, b16decode
SEPARATOR = '\n' SEPARATOR = '\n'
......
...@@ -29,9 +29,12 @@ ...@@ -29,9 +29,12 @@
############################################################################## ##############################################################################
from App.Extensions import getBrain from App.Extensions import getBrain
from Acquisition import Explicit, aq_base from Acquisition import Explicit
from Acquisition import aq_base
from lxml import etree from lxml import etree
from zLOG import LOG, ERROR, INFO from zLOG import ERROR
from zLOG import INFO
from zLOG import LOG
from base64 import b16encode, b16decode from base64 import b16encode, b16decode
SEPARATOR = '\n' SEPARATOR = '\n'
......
...@@ -32,7 +32,8 @@ from Products.ERP5Type.Utils import cartesianProduct ...@@ -32,7 +32,8 @@ from Products.ERP5Type.Utils import cartesianProduct
from Products.ERP5TioSafe.Conduit.TioSafeResourceConduit import TioSafeResourceConduit from Products.ERP5TioSafe.Conduit.TioSafeResourceConduit import TioSafeResourceConduit
from Products.ERP5SyncML.Document.Conflict import Conflict from Products.ERP5SyncML.Document.Conflict import Conflict
from lxml import etree from lxml import etree
from zLOG import LOG, INFO from zLOG import INFO
from zLOG import LOG
class ZencartResourceConduit(TioSafeResourceConduit): class ZencartResourceConduit(TioSafeResourceConduit):
""" """
......
...@@ -29,7 +29,10 @@ ...@@ -29,7 +29,10 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces from Products.ERP5Type import Constraint
from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5Type import interfaces
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
class FTPConnector(XMLObject): class FTPConnector(XMLObject):
......
...@@ -34,4 +34,3 @@ class WebSite(VirtualFolderMixin, SimpleWebSite): ...@@ -34,4 +34,3 @@ class WebSite(VirtualFolderMixin, SimpleWebSite):
""" """
XXX XXX
""" """
pass
from zLOG import LOG, WARNING from zLOG import LOG
from zLOG import WARNING
def Alarm_updatePersonModulePasswordInformation(self, **kw): def Alarm_updatePersonModulePasswordInformation(self, **kw):
""" """
......
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
import datetime import datetime
import random import random
import time
import string
from utils import * from utils import *
TMIN_SLEEP = 2 TMIN_SLEEP = 2
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import datetime import datetime
import random
import time
import string
from utils import * from utils import *
PREFIX_TITLE = "" PREFIX_TITLE = ""
......
...@@ -5,7 +5,6 @@ import os ...@@ -5,7 +5,6 @@ import os
import shutil import shutil
import time import time
import sys import sys
import multiprocessing
import subprocess import subprocess
import signal import signal
import errno import errno
...@@ -127,7 +126,6 @@ def getCreatedDocumentNumberFromERP5(erp5_url, log): ...@@ -127,7 +126,6 @@ def getCreatedDocumentNumberFromERP5(erp5_url, log):
import product.ERP5Type.tests.ERP5TypeTestSuite import product.ERP5Type.tests.ERP5TypeTestSuite
from subprocess import call
LOG_FILE_PREFIX = "performance_tester_erp5" LOG_FILE_PREFIX = "performance_tester_erp5"
# Duration of a test case # Duration of a test case
......
...@@ -654,7 +654,6 @@ class LoginError(Exception): ...@@ -654,7 +654,6 @@ class LoginError(Exception):
""" """
Exception raised when login fails Exception raised when login fails
""" """
pass
class MainForm(Form): class MainForm(Form):
""" """
......
...@@ -24,21 +24,13 @@ ...@@ -24,21 +24,13 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# #
############################################################################## ##############################################################################
from datetime import datetime,timedelta
import os import os
import subprocess
import sys
import time
import glob
import SlapOSControler import SlapOSControler
import json
import time
import shutil
import logging
import string import string
import random import random
from ProcessManager import SubprocessError, ProcessManager, CancellationError from ProcessManager import CancellationError
from subprocess import CalledProcessError from ProcessManager import ProcessManager
from ProcessManager import SubprocessError
from Updater import Updater from Updater import Updater
from erp5.util import taskdistribution from erp5.util import taskdistribution
......
...@@ -206,7 +206,6 @@ class ProcessManager(object): ...@@ -206,7 +206,6 @@ class ProcessManager(object):
os.kill(supervisor_pid, signal.SIGTERM) os.kill(supervisor_pid, signal.SIGTERM)
except: except:
self.log('ProcessManager killPreviousRun, exception when killing supervisor') self.log('ProcessManager killPreviousRun, exception when killing supervisor')
pass
self.process_pid_set.clear() self.process_pid_set.clear()
def sigterm_handler(self, signal, frame): def sigterm_handler(self, signal, frame):
......
...@@ -26,21 +26,15 @@ ...@@ -26,21 +26,15 @@
############################################################################## ##############################################################################
import datetime import datetime
import os import os
import subprocess
import sys
import time import time
import glob
import SlapOSControler import SlapOSControler
import SlapOSMasterCommunicator import SlapOSMasterCommunicator
import json import json
import time import time
import shutil
import logging
import string
import random
import Utils import Utils
from ProcessManager import SubprocessError, ProcessManager, CancellationError from ProcessManager import CancellationError
from subprocess import CalledProcessError from ProcessManager import ProcessManager
from ProcessManager import SubprocessError
from Updater import Updater from Updater import Updater
from erp5.util import taskdistribution from erp5.util import taskdistribution
# for dummy slapos answer # for dummy slapos answer
......
...@@ -32,7 +32,6 @@ import time ...@@ -32,7 +32,6 @@ import time
import xml_marshaller import xml_marshaller
import shutil import shutil
import sys import sys
import glob
import argparse import argparse
import json import json
from slapos import client from slapos import client
......
...@@ -24,21 +24,12 @@ ...@@ -24,21 +24,12 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# #
############################################################################## ##############################################################################
from datetime import datetime,timedelta
import os import os
import subprocess
import sys
import time
import glob import glob
import SlapOSControler import SlapOSControler
import json from ProcessManager import CancellationError
import time from ProcessManager import ProcessManager
import shutil from ProcessManager import SubprocessError
import logging
import string
import random
from ProcessManager import SubprocessError, ProcessManager, CancellationError
from subprocess import CalledProcessError
from NodeTestSuite import SlapOSInstance from NodeTestSuite import SlapOSInstance
from Updater import Updater from Updater import Updater
from Utils import dealShebang from Utils import dealShebang
......
...@@ -28,9 +28,7 @@ import errno ...@@ -28,9 +28,7 @@ import errno
import os import os
import re import re
import shutil import shutil
import subprocess
import sys import sys
import threading
from ProcessManager import SubprocessError from ProcessManager import SubprocessError
......
import sys
import json
import shutil
import string
from random import choice
def deunicodeData(data): def deunicodeData(data):
if isinstance(data, list): if isinstance(data, list):
......
...@@ -32,7 +32,8 @@ import weakref ...@@ -32,7 +32,8 @@ import weakref
from SOAPpy.wstools import WSDLTools from SOAPpy.wstools import WSDLTools
from SOAPpy.Client import SOAPProxy from SOAPpy.Client import SOAPProxy
from SOAPpy.Types import headerType, faultType from SOAPpy.Types import faultType
from SOAPpy.Types import headerType
## ##
## Hierarchy of the WSDL elements and how the elements relate to each other ## Hierarchy of the WSDL elements and how the elements relate to each other
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
############################################################################## ##############################################################################
from Products.ERP5Type.Utils import getPath from Products.ERP5Type.Utils import getPath
from zLOG import LOG, INFO from zLOG import INFO
from zLOG import LOG
from Products.PythonScripts.Utility import allow_class from Products.PythonScripts.Utility import allow_class
class ActiveResult: class ActiveResult:
......
...@@ -256,7 +256,6 @@ class Queue(object): ...@@ -256,7 +256,6 @@ class Queue(object):
""" """
delay is provided in fractions of day delay is provided in fractions of day
""" """
pass
def getPriority(self, activity_tool): def getPriority(self, activity_tool):
""" """
......
...@@ -27,13 +27,17 @@ ...@@ -27,13 +27,17 @@
############################################################################## ##############################################################################
from Products.CMFActivity.ActivityTool import Message, registerActivity from Products.CMFActivity.ActivityTool import Message, registerActivity
import sys
#from time import time #from time import time
from SQLBase import SQLBase, sort_message_key from SQLBase import SQLBase, sort_message_key
import transaction import transaction
from zLOG import LOG, TRACE, WARNING, ERROR, INFO, PANIC from zLOG import ERROR
from zLOG import INFO
from zLOG import LOG
from zLOG import PANIC
from zLOG import TRACE
from zLOG import WARNING
# Stop validating more messages when this limit is reached # Stop validating more messages when this limit is reached
MAX_VALIDATED_LIMIT = 1000 MAX_VALIDATED_LIMIT = 1000
......
...@@ -33,7 +33,12 @@ from zExceptions import ExceptionFormatter ...@@ -33,7 +33,12 @@ from zExceptions import ExceptionFormatter
import transaction import transaction
from zLOG import LOG, WARNING, ERROR, INFO, PANIC, TRACE from zLOG import ERROR
from zLOG import INFO
from zLOG import LOG
from zLOG import PANIC
from zLOG import TRACE
from zLOG import WARNING
# Stop validating more messages when this limit is reached # Stop validating more messages when this limit is reached
MAX_VALIDATED_LIMIT = 1000 MAX_VALIDATED_LIMIT = 1000
......
...@@ -30,7 +30,6 @@ import socket ...@@ -30,7 +30,6 @@ import socket
import urllib import urllib
import threading import threading
import sys import sys
from types import StringType
from collections import defaultdict from collections import defaultdict
from cPickle import dumps, loads from cPickle import dumps, loads
from Products.CMFCore import permissions as CMFCorePermissions from Products.CMFCore import permissions as CMFCorePermissions
...@@ -626,7 +625,8 @@ class ActivityTool (Folder, UniqueObject): ...@@ -626,7 +625,8 @@ class ActivityTool (Folder, UniqueObject):
def initialize(self): def initialize(self):
global is_initialized global is_initialized
from Activity import SQLQueue, SQLDict from Activity import SQLDict
from Activity import SQLQueue
# Initialize each queue # Initialize each queue
for activity in activity_dict.itervalues(): for activity in activity_dict.itervalues():
activity.initialize(self) activity.initialize(self)
......
...@@ -26,12 +26,13 @@ ...@@ -26,12 +26,13 @@
# #
############################################################################## ##############################################################################
import string
from Products.ERP5Type.Globals import InitializeClass, DTMLFile from Products.ERP5Type.Globals import InitializeClass, DTMLFile
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager from AccessControl import getSecurityManager
from Acquisition import aq_base, aq_inner, aq_parent from Acquisition import aq_base
from Acquisition import aq_inner
from Acquisition import aq_parent
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
......
...@@ -47,7 +47,6 @@ from Products.CMFCore.PortalFolder import ContentFilter ...@@ -47,7 +47,6 @@ from Products.CMFCore.PortalFolder import ContentFilter
from Products.CMFCategory.Renderer import Renderer from Products.CMFCategory.Renderer import Renderer
from Products.CMFCategory.Category import Category, BaseCategory from Products.CMFCategory.Category import Category, BaseCategory
from OFS.Traversable import NotFound from OFS.Traversable import NotFound
import types
import re import re
......
...@@ -28,7 +28,9 @@ import traceback ...@@ -28,7 +28,9 @@ import traceback
import time import time
from cStringIO import StringIO from cStringIO import StringIO
from zLOG import LOG, DEBUG, ERROR from zLOG import DEBUG
from zLOG import ERROR
from zLOG import LOG
from App.config import getConfiguration from App.config import getConfiguration
def dump_threads(): def dump_threads():
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
############################################################################## ##############################################################################
from Products.ERP5Type.mixin.constraint import ConstraintMixin from Products.ERP5Type.mixin.constraint import ConstraintMixin
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5Type.Message import Message from Products.ERP5Type.Message import Message
translateString = lambda msg: msg # just to extract messages translateString = lambda msg: msg # just to extract messages
_MARKER = [] _MARKER = []
......
...@@ -174,7 +174,6 @@ class Amount(Base, VariatedMixin): ...@@ -174,7 +174,6 @@ class Amount(Base, VariatedMixin):
"""Do nothing in the case of an amount, because variation base category """Do nothing in the case of an amount, because variation base category
list are set on the resource. list are set on the resource.
""" """
pass
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getVariationBaseCategoryItemList') 'getVariationBaseCategoryItemList')
......
...@@ -28,7 +28,9 @@ ...@@ -28,7 +28,9 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint from Products.ERP5Type import Constraint
from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5Type.XMLMatrix import XMLMatrix from Products.ERP5Type.XMLMatrix import XMLMatrix
from Products.ERP5Type.Utils import cartesianProduct from Products.ERP5Type.Utils import cartesianProduct
from Products.ERP5.Document.AmountGeneratorLine import AmountGeneratorLine from Products.ERP5.Document.AmountGeneratorLine import AmountGeneratorLine
......
...@@ -895,7 +895,6 @@ class ObjectTemplateItem(BaseTemplateItem): ...@@ -895,7 +895,6 @@ class ObjectTemplateItem(BaseTemplateItem):
Called right at the begining of "install" method. Called right at the begining of "install" method.
Can be overridden by subclasses. Can be overridden by subclasses.
""" """
pass
def afterInstall(self): def afterInstall(self):
""" """
...@@ -903,7 +902,6 @@ class ObjectTemplateItem(BaseTemplateItem): ...@@ -903,7 +902,6 @@ class ObjectTemplateItem(BaseTemplateItem):
Called right before returning in "install" method. Called right before returning in "install" method.
Can be overridden by subclasses. Can be overridden by subclasses.
""" """
pass
def onNewObject(self, obj): def onNewObject(self, obj):
""" """
...@@ -913,7 +911,6 @@ class ObjectTemplateItem(BaseTemplateItem): ...@@ -913,7 +911,6 @@ class ObjectTemplateItem(BaseTemplateItem):
`obj` parameter is the newly created object in its acquisition context. `obj` parameter is the newly created object in its acquisition context.
Can be overridden by subclasses. Can be overridden by subclasses.
""" """
pass
def setSafeReindexationMode(self, context): def setSafeReindexationMode(self, context):
""" """
...@@ -3685,7 +3682,6 @@ class FilesystemToZodbTemplateItem(FilesystemDocumentTemplateItem, ...@@ -3685,7 +3682,6 @@ class FilesystemToZodbTemplateItem(FilesystemDocumentTemplateItem,
""" """
Hook called after uninstall Hook called after uninstall
""" """
pass
def uninstall(self, *args, **kw): def uninstall(self, *args, **kw):
# Only for uninstall, the path of objects can be given as a # Only for uninstall, the path of objects can be given as a
......
...@@ -50,7 +50,6 @@ class Capacity(XMLObject): ...@@ -50,7 +50,6 @@ class Capacity(XMLObject):
""" """
Returns an association list of points and capacity values Returns an association list of points and capacity values
""" """
pass
security.declarePublic('reindexObject') security.declarePublic('reindexObject')
......
...@@ -26,7 +26,9 @@ ...@@ -26,7 +26,9 @@
############################################################################## ##############################################################################
from ERP5ProjectUnitTestDistributor import ERP5ProjectUnitTestDistributor from ERP5ProjectUnitTestDistributor import ERP5ProjectUnitTestDistributor
import json import json
from zLOG import LOG,INFO,ERROR from zLOG import LOG
from zLOG import ERROR
from zLOG import INFO
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
...@@ -43,7 +45,6 @@ class CloudPerformanceUnitTestDistributor(ERP5ProjectUnitTestDistributor): ...@@ -43,7 +45,6 @@ class CloudPerformanceUnitTestDistributor(ERP5ProjectUnitTestDistributor):
all test nodes runs all test suites, this is not a problem to keep all test nodes runs all test suites, this is not a problem to keep
configuration configuration
""" """
pass
security.declarePublic("optimizeConfiguration") security.declarePublic("optimizeConfiguration")
def optimizeConfiguration(self): def optimizeConfiguration(self):
......
...@@ -183,7 +183,6 @@ class Coordinate(Base): ...@@ -183,7 +183,6 @@ class Coordinate(Base):
""" """
Returns the standard text formats for telephone numbers Returns the standard text formats for telephone numbers
""" """
pass
security.declareProtected(Permissions.AccessContentsInformation, 'isDetailed') security.declareProtected(Permissions.AccessContentsInformation, 'isDetailed')
def isDetailed(self): def isDetailed(self):
......
...@@ -43,7 +43,8 @@ from Products.ERP5.mixin.composition import CompositionMixin ...@@ -43,7 +43,8 @@ from Products.ERP5.mixin.composition import CompositionMixin
from Products.ERP5.mixin.rule import SimulableMixin from Products.ERP5.mixin.rule import SimulableMixin
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod, \ from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod, \
unrestricted_apply unrestricted_apply
from zLOG import LOG, PROBLEM from zLOG import LOG
from zLOG import PROBLEM
class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin, class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin,
CompositionMixin, AmountGeneratorMixin): CompositionMixin, AmountGeneratorMixin):
...@@ -735,7 +736,6 @@ class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin, ...@@ -735,7 +736,6 @@ class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin,
""" """
This is a hack This is a hack
""" """
pass
security.declareProtected( Permissions.AccessContentsInformation, security.declareProtected( Permissions.AccessContentsInformation,
'getParentExplanationValue') 'getParentExplanationValue')
...@@ -755,7 +755,6 @@ class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin, ...@@ -755,7 +755,6 @@ class Delivery(XMLObject, ImmobilisationDelivery, SimulableMixin,
""" """
This is a hack This is a hack
""" """
pass
def getBuilderList(self): def getBuilderList(self):
"""Returns appropriate builder list.""" """Returns appropriate builder list."""
......
...@@ -27,11 +27,12 @@ ...@@ -27,11 +27,12 @@
# #
############################################################################## ##############################################################################
import re, sys, os import re
from operator import add
from zLOG import LOG from zLOG import LOG
from AccessControl import ClassSecurityInfo, getSecurityManager from AccessControl import ClassSecurityInfo
from AccessControl.SecurityManagement import newSecurityManager, setSecurityManager from AccessControl import getSecurityManager
from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import setSecurityManager
from Acquisition import aq_base from Acquisition import aq_base
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.Globals import get_request from Products.ERP5Type.Globals import get_request
......
...@@ -27,13 +27,9 @@ ...@@ -27,13 +27,9 @@
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5.Tool.TaskDistributionTool import TaskDistributionTool from Products.ERP5.Tool.TaskDistributionTool import TaskDistributionTool
from DateTime import DateTime from DateTime import DateTime
from datetime import datetime
import json import json
import sys
import itertools import itertools
from copy import deepcopy
import random import random
import string
from zLOG import LOG,INFO,ERROR from zLOG import LOG,INFO,ERROR
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
......
...@@ -27,10 +27,10 @@ ...@@ -27,10 +27,10 @@
# #
############################################################################## ##############################################################################
import re, types import re
from email.utils import formataddr
from DateTime import DateTime from DateTime import DateTime
from AccessControl import ClassSecurityInfo, Unauthorized from AccessControl import ClassSecurityInfo
from AccessControl import Unauthorized
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.CMFCore.utils import _checkPermission from Products.CMFCore.utils import _checkPermission
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
...@@ -510,7 +510,6 @@ class EmailDocument(TextDocument): ...@@ -510,7 +510,6 @@ class EmailDocument(TextDocument):
to extract content information from this mail to extract content information from this mail
message. message.
""" """
pass
security.declareProtected(Permissions.View, 'index_html') security.declareProtected(Permissions.View, 'index_html')
index_html = TextDocument.index_html index_html = TextDocument.index_html
......
...@@ -33,11 +33,13 @@ from Products.ERP5Type.XMLObject import XMLObject ...@@ -33,11 +33,13 @@ from Products.ERP5Type.XMLObject import XMLObject
from Products.ERP5Type.Core.Predicate import Predicate from Products.ERP5Type.Core.Predicate import Predicate
from Products.ERP5.Document.Amount import Amount from Products.ERP5.Document.Amount import Amount
from Products.ERP5.MovementGroup import MovementGroupNode from Products.ERP5.MovementGroup import MovementGroupNode
from Products.ERP5.mixin.builder import BuilderMixin, SelectMethodError from Products.ERP5.mixin.builder import BuilderMixin
from Products.ERP5.mixin.builder import SelectMethodError
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod
from DateTime import DateTime from DateTime import DateTime
from Acquisition import aq_parent, aq_inner from Acquisition import aq_inner
from Acquisition import aq_parent
class GeneratedDeliveryBuilder(BuilderMixin): class GeneratedDeliveryBuilder(BuilderMixin):
""" """
......
...@@ -33,7 +33,6 @@ from Products.ERP5Type.Utils import deprecated ...@@ -33,7 +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):
""" """
......
...@@ -28,11 +28,15 @@ ...@@ -28,11 +28,15 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces from Products.ERP5Type import Constraint
from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5Type import interfaces
from Products.ERP5Type.Cache import caching_instance_method from Products.ERP5Type.Cache import caching_instance_method
from Products.ERP5Type.Base import Base from Products.ERP5Type.Base import Base
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from zLOG import LOG, INFO from zLOG import INFO
from zLOG import LOG
class IdGenerator(Base): class IdGenerator(Base):
""" """
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
# #
############################################################################## ##############################################################################
import string
import struct import struct
import subprocess import subprocess
from cStringIO import StringIO from cStringIO import StringIO
......
...@@ -60,4 +60,3 @@ class IndependentCapacity(Capacity): ...@@ -60,4 +60,3 @@ class IndependentCapacity(Capacity):
""" """
#return additiveCartesianProduct(DependentCapacity.asCapacityItemList(self)) #return additiveCartesianProduct(DependentCapacity.asCapacityItemList(self))
#return map(lambda capacity: ((capacity, self.getQuantity())), self.getResourceList()) #return map(lambda capacity: ((capacity, self.getQuantity())), self.getResourceList())
pass
...@@ -32,7 +32,6 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -32,7 +32,6 @@ from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Utils import deprecated from Products.ERP5Type.Utils import deprecated
from Products.ERP5.Document.Delivery import Delivery from Products.ERP5.Document.Delivery import Delivery
from warnings import warn
class Order(Delivery): class Order(Delivery):
# CMF Type Definition # CMF Type Definition
......
...@@ -32,7 +32,6 @@ from AccessControl import ClassSecurityInfo ...@@ -32,7 +32,6 @@ from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Delivery import Delivery from Products.ERP5.Document.Delivery import Delivery
from warnings import warn
class PackingList(Delivery): class PackingList(Delivery):
""" """
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
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.ERP5.mixin.builder import SelectMethodError
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable 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
...@@ -98,7 +99,6 @@ class SimulatedDeliveryBuilder(BuilderMixin): ...@@ -98,7 +99,6 @@ class SimulatedDeliveryBuilder(BuilderMixin):
Redefine this method, because it seems nothing interesting can be Redefine this method, because it seems nothing interesting can be
done before building Delivery. done before building Delivery.
""" """
pass
@UnrestrictedMethod @UnrestrictedMethod
def searchMovementList(self, applied_rule_uid=None, **kw): def searchMovementList(self, applied_rule_uid=None, **kw):
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5.Document.Delivery import Delivery from Products.ERP5.Document.Delivery import Delivery
......
...@@ -34,7 +34,6 @@ from Products.ERP5Type import Permissions, PropertySheet ...@@ -34,7 +34,6 @@ from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5.Document.Document import Document, ConversionError, _MARKER, DEFAULT_CONTENT_TYPE from Products.ERP5.Document.Document import Document, ConversionError, _MARKER, DEFAULT_CONTENT_TYPE
from Products.ERP5.Document.File import File from Products.ERP5.Document.File import File
from Products.ERP5Type.WebDAVSupport import TextContent from Products.ERP5Type.WebDAVSupport import TextContent
import re
from Products.ERP5.Document.Document import VALID_IMAGE_FORMAT_LIST, VALID_TEXT_FORMAT_LIST from Products.ERP5.Document.Document import VALID_IMAGE_FORMAT_LIST, VALID_TEXT_FORMAT_LIST
import cStringIO import cStringIO
from string import Template from string import Template
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# #
############################################################################## ##############################################################################
from zLOG import LOG, WARNING from zLOG import LOG
from zLOG import WARNING
from warnings import warn from warnings import warn
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
......
...@@ -29,7 +29,9 @@ ...@@ -29,7 +29,9 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Acquisition import aq_base from Acquisition import aq_base
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5Type import interfaces
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5.mixin.rule import RuleMixin, MovementGeneratorMixin from Products.ERP5.mixin.rule import RuleMixin, MovementGeneratorMixin
from Products.ERP5.mixin.movement_collection_updater import \ from Products.ERP5.mixin.movement_collection_updater import \
......
...@@ -29,7 +29,9 @@ ...@@ -29,7 +29,9 @@
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Acquisition import aq_base from Acquisition import aq_base
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5Type import interfaces
from Products.ERP5.mixin.rule import RuleMixin, MovementGeneratorMixin from Products.ERP5.mixin.rule import RuleMixin, MovementGeneratorMixin
from Products.ERP5.mixin.movement_collection_updater import \ from Products.ERP5.mixin.movement_collection_updater import \
MovementCollectionUpdaterMixin MovementCollectionUpdaterMixin
......
...@@ -31,7 +31,9 @@ ...@@ -31,7 +31,9 @@
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, interfaces from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5Type import interfaces
from Products.ERP5.Document.AmountGeneratorLine import AmountGeneratorLine from Products.ERP5.Document.AmountGeneratorLine import AmountGeneratorLine
......
...@@ -39,7 +39,10 @@ import ERP5Defaults ...@@ -39,7 +39,10 @@ import ERP5Defaults
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5Type.dynamic.portal_type_class import synchronizeDynamicModules from Products.ERP5Type.dynamic.portal_type_class import synchronizeDynamicModules
from zLOG import LOG, INFO, WARNING, ERROR from zLOG import ERROR
from zLOG import INFO
from zLOG import LOG
from zLOG import WARNING
from string import join from string import join
import os import os
import warnings import warnings
...@@ -1996,7 +1999,6 @@ class ERP5Generator(PortalGenerator): ...@@ -1996,7 +1999,6 @@ class ERP5Generator(PortalGenerator):
""" """
ERP5 is not a CMS ERP5 is not a CMS
""" """
pass
# this lists only the skin layers of Products.CMFDefault we are actually # this lists only the skin layers of Products.CMFDefault we are actually
# interested in. # interested in.
......
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
# #
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass, DTMLFile from Products.ERP5Type.Globals import DTMLFile
from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5 import _dtmldir from Products.ERP5 import _dtmldir
......
...@@ -32,7 +32,9 @@ import threading ...@@ -32,7 +32,9 @@ import threading
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from AccessControl.SecurityManagement import getSecurityManager, \ from AccessControl.SecurityManagement import getSecurityManager, \
newSecurityManager, setSecurityManager newSecurityManager, setSecurityManager
from Products.ERP5Type.Globals import InitializeClass, DTMLFile, PersistentMapping from Products.ERP5Type.Globals import DTMLFile
from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Globals import PersistentMapping
from Products.ERP5Type.Core.Folder import Folder from Products.ERP5Type.Core.Folder import Folder
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
......
...@@ -58,11 +58,9 @@ def binary_search(binary): ...@@ -58,11 +58,9 @@ def binary_search(binary):
class CertificateAuthorityBusy(Exception): class CertificateAuthorityBusy(Exception):
"""Exception raised when certificate authority is busy""" """Exception raised when certificate authority is busy"""
pass
class CertificateAuthorityDamaged(Exception): class CertificateAuthorityDamaged(Exception):
"""Exception raised when certificate authority is damaged""" """Exception raised when certificate authority is damaged"""
pass
class CertificateAuthorityTool(BaseTool): class CertificateAuthorityTool(BaseTool):
"""CertificateAuthorityTool """CertificateAuthorityTool
......
...@@ -15,7 +15,9 @@ ...@@ -15,7 +15,9 @@
# #
############################################################################## ##############################################################################
import urllib2, os, dircache, urllib import dircache
import os
import urllib
from StringIO import StringIO from StringIO import StringIO
from urllib2 import FileHandler, url2pathname, addinfourl, URLError from urllib2 import FileHandler, url2pathname, addinfourl, URLError
import mimetypes, mimetools import mimetypes, mimetools
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
import cStringIO import cStringIO
import re import re
import socket
import urllib2, urllib import urllib2, urllib
import urlparse import urlparse
from cgi import parse_header from cgi import parse_header
...@@ -292,7 +291,6 @@ class ContributionTool(BaseTool): ...@@ -292,7 +291,6 @@ class ContributionTool(BaseTool):
Create a new content based on XML data. This is intended for contributing Create a new content based on XML data. This is intended for contributing
to ERP5 from another application. to ERP5 from another application.
""" """
pass
security.declareProtected(Permissions.ModifyPortalContent, security.declareProtected(Permissions.ModifyPortalContent,
'getMatchedFilenamePatternDict') 'getMatchedFilenamePatternDict')
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type.Globals import InitializeClass, DTMLFile from Products.ERP5Type.Globals import DTMLFile
from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5 import _dtmldir from Products.ERP5 import _dtmldir
......
...@@ -35,7 +35,10 @@ from Products.ERP5Type.Globals import InitializeClass, DTMLFile, PersistentMappi ...@@ -35,7 +35,10 @@ from Products.ERP5Type.Globals import InitializeClass, DTMLFile, PersistentMappi
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type.Cache import caching_instance_method from Products.ERP5Type.Cache import caching_instance_method
from Products.ERP5Type import Permissions, interfaces from Products.ERP5Type import Permissions, interfaces
from zLOG import LOG, WARNING, INFO, ERROR from zLOG import ERROR
from zLOG import INFO
from zLOG import LOG
from zLOG import WARNING
from Products.ERP5 import _dtmldir from Products.ERP5 import _dtmldir
from BTrees.Length import Length from BTrees.Length import Length
......
...@@ -27,7 +27,9 @@ ...@@ -27,7 +27,9 @@
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.CMFCore.utils import UniqueObject, _checkPermission, _getAuthenticatedUser from Products.CMFCore.utils import UniqueObject
from Products.CMFCore.utils import _checkPermission
from Products.CMFCore.utils import _getAuthenticatedUser
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Acquisition import aq_base from Acquisition import aq_base
from DateTime import DateTime from DateTime import DateTime
......
...@@ -2255,7 +2255,6 @@ class SimulationTool(BaseTool): ...@@ -2255,7 +2255,6 @@ class SimulationTool(BaseTool):
if o.isCapacity(): if o.isCapacity():
# Do whatever is needed # Do whatever is needed
capacity_item_list += o.asCapacityItemList() capacity_item_list += o.asCapacityItemList()
pass
# Do whatever with capacity_item_list # Do whatever with capacity_item_list
# and store the resulting new capacity in node # and store the resulting new capacity in node
node._capacity_item_list = capacity_item_list node._capacity_item_list = capacity_item_list
......
...@@ -31,7 +31,8 @@ import zope.interface ...@@ -31,7 +31,8 @@ import zope.interface
import re import re
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, interfaces from Products.ERP5Type import Permissions
from Products.ERP5Type import interfaces
from Products.ERP5Type.Tool.TypesTool import TypeProvider from Products.ERP5Type.Tool.TypesTool import TypeProvider
from Products.ERP5 import DeliverySolver from Products.ERP5 import DeliverySolver
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
......
...@@ -28,7 +28,10 @@ ...@@ -28,7 +28,10 @@
import random import random
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type import Permissions, PropertySheet, Constraint, interfaces from Products.ERP5Type import Constraint
from Products.ERP5Type import Permissions
from Products.ERP5Type import PropertySheet
from Products.ERP5Type import interfaces
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery from Products.ZSQLCatalog.SQLCatalog import SimpleQuery
from zLOG import LOG from zLOG import LOG
......
...@@ -34,7 +34,8 @@ import os ...@@ -34,7 +34,8 @@ import os
import shutil import shutil
import sys import sys
from Acquisition import Implicit, Explicit from Acquisition import Explicit
from Acquisition import Implicit
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from AccessControl.SecurityInfo import ModuleSecurityInfo from AccessControl.SecurityInfo import ModuleSecurityInfo
from Products.CMFActivity.ActiveResult import ActiveResult from Products.CMFActivity.ActiveResult import ActiveResult
...@@ -73,17 +74,14 @@ class BusinessTemplateUnknownError(Exception): ...@@ -73,17 +74,14 @@ class BusinessTemplateUnknownError(Exception):
""" Exception raised when the business template """ Exception raised when the business template
is impossible to find in the repositories is impossible to find in the repositories
""" """
pass
class UnsupportedComparingOperator(Exception): class UnsupportedComparingOperator(Exception):
""" Exception when the comparing string is unsupported """ Exception when the comparing string is unsupported
""" """
pass
class BusinessTemplateIsMeta(Exception): class BusinessTemplateIsMeta(Exception):
""" Exception when the business template is provided by another one """ Exception when the business template is provided by another one
""" """
pass
ModuleSecurityInfo(__name__).declarePublic('BusinessTemplateUnknownError') ModuleSecurityInfo(__name__).declarePublic('BusinessTemplateUnknownError')
......
...@@ -32,7 +32,9 @@ from Products.CMFCore.utils import UniqueObject ...@@ -32,7 +32,9 @@ from Products.CMFCore.utils import UniqueObject
from Acquisition import Implicit from Acquisition import Implicit
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass, DTMLFile, PersistentMapping from Products.ERP5Type.Globals import DTMLFile
from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Globals import PersistentMapping
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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