Commit c83eab31 authored by Rafael Monnerat's avatar Rafael Monnerat

Remove whitespaces and useless imports.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@44371 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c6761999
...@@ -30,12 +30,9 @@ from AccessControl import ClassSecurityInfo ...@@ -30,12 +30,9 @@ 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 zLOG import LOG, ERROR, DEBUG, WARNING
from tempfile import mktemp from tempfile import mktemp
import os import os
import sys
from os.path import basename, splitext, join
from Products.DCWorkflowGraph.config import bin_search_path, DOT_EXE from Products.DCWorkflowGraph.config import bin_search_path, DOT_EXE
from Products.DCWorkflowGraph.DCWorkflowGraph import bin_search from Products.DCWorkflowGraph.DCWorkflowGraph import bin_search
...@@ -76,7 +73,7 @@ class Workflow(XMLObject): ...@@ -76,7 +73,7 @@ class Workflow(XMLObject):
document.setCategoryMembership(state_bc_id, self.getSource()) document.setCategoryMembership(state_bc_id, self.getSource())
object = self.getStateChangeInformation(document, self.getSourceValue()) object = self.getStateChangeInformation(document, self.getSourceValue())
# Initialize workflow history # Initialize workflow history
status_dict = {state_bc_id: self.getSource()} status_dict = {state_bc_id: self.getSource()}
variable_list = self.contentValues(portal_type='Variable') variable_list = self.contentValues(portal_type='Variable')
...@@ -99,12 +96,12 @@ class Workflow(XMLObject): ...@@ -99,12 +96,12 @@ class Workflow(XMLObject):
document.workflow_history = PersistentMapping() document.workflow_history = PersistentMapping()
# XXX this _p_changed is apparently not necessary # XXX this _p_changed is apparently not necessary
document._p_changed = 1 document._p_changed = 1
# Add an entry for the workflow in the history # Add an entry for the workflow in the history
workflow_key = self._generateHistoryKey() workflow_key = self._generateHistoryKey()
if not document.workflow_history.has_key(workflow_key): if not document.workflow_history.has_key(workflow_key):
document.workflow_history[workflow_key] = () document.workflow_history[workflow_key] = ()
# Update history # Update history
document.workflow_history[workflow_key] += (status_dict, ) document.workflow_history[workflow_key] += (status_dict, )
# XXX this _p_changed marks the document modified, but the # XXX this _p_changed marks the document modified, but the
...@@ -112,13 +109,13 @@ class Workflow(XMLObject): ...@@ -112,13 +109,13 @@ class Workflow(XMLObject):
document._p_changed = 1 document._p_changed = 1
# XXX this _p_changed is apparently not necessary # XXX this _p_changed is apparently not necessary
document.workflow_history._p_changed = 1 document.workflow_history._p_changed = 1
def getCurrentStatusDict(self, document): def getCurrentStatusDict(self, document):
""" """
Get the current status dict. Get the current status dict.
""" """
workflow_key = self._generateHistoryKey() workflow_key = self._generateHistoryKey()
# Copy is requested # Copy is requested
result = document.workflow_history[workflow_key][-1].copy() result = document.workflow_history[workflow_key][-1].copy()
return result return result
...@@ -166,7 +163,7 @@ class Workflow(XMLObject): ...@@ -166,7 +163,7 @@ class Workflow(XMLObject):
return result return result
def getPOT(self): def getPOT(self):
""" """
get the pot, copy from: get the pot, copy from:
"dcworkfow2dot.py":http://awkly.org/Members/sidnei/weblog_storage/blog_27014 "dcworkfow2dot.py":http://awkly.org/Members/sidnei/weblog_storage/blog_27014
and Sidnei da Silva owns the copyright of the this function and Sidnei da Silva owns the copyright of the this function
...@@ -186,7 +183,7 @@ class Workflow(XMLObject): ...@@ -186,7 +183,7 @@ class Workflow(XMLObject):
if destination_state is None: if destination_state is None:
# take care of 'remain in state' transitions # take care of 'remain in state' transitions
destination_state = state destination_state = state
# #
key = (state.getId(), destination_state.getId()) key = (state.getId(), destination_state.getId())
value = transition_dict.get(key, []) value = transition_dict.get(key, [])
value.append(available_transition.getTitle()) value.append(available_transition.getTitle())
......
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