Commit b5200bc2 authored by Gabriel Monnerat's avatar Gabriel Monnerat

ERP5: remove unused imports and follow PEP8

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