Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Products.DCWorkflow
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Products.DCWorkflow
Commits
6fcffc95
Commit
6fcffc95
authored
Nov 21, 2011
by
Patrick Gerken
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merge default encoding change into trunk
parent
b1b8a205
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
16 deletions
+18
-16
Products/DCWorkflow/CHANGES.txt
Products/DCWorkflow/CHANGES.txt
+2
-0
Products/DCWorkflow/exportimport.py
Products/DCWorkflow/exportimport.py
+16
-16
No files found.
Products/DCWorkflow/CHANGES.txt
View file @
6fcffc95
...
...
@@ -28,6 +28,8 @@ Products.DCWorkflow Changelog
- Deal with deprecation warnings for Zope 2.13.
- Change default encoding of exports from None to utf-8.
2.2.0-beta (2009-12-06)
-----------------------
...
...
Products/DCWorkflow/exportimport.py
View file @
6fcffc95
...
...
@@ -148,7 +148,7 @@ class WorkflowDefinitionConfigurator( Implicit ):
return
self
.
_extractScripts
(
self
.
_obj
)
security
.
declareProtected
(
ManagePortal
,
'parseWorkflowXML'
)
def
parseWorkflowXML
(
self
,
xml
,
encoding
=
None
):
def
parseWorkflowXML
(
self
,
xml
,
encoding
=
'utf-8'
):
""" Pseudo API.
"""
dom
=
parseString
(
xml
)
...
...
@@ -648,7 +648,7 @@ def _getScriptFilename( workflow_id, script_id, meta_type ):
return
'workflows/%s/scripts/%s.%s'
%
(
wf_dir
,
script_id
,
suffix
)
def
_extractCreationGuard
(
root
,
encoding
=
None
)
:
def
_extractCreationGuard
(
root
,
encoding
=
'utf-8'
)
:
icc
=
root
.
getElementsByTagName
(
'instance-creation-conditions'
)
assert
len
(
icc
)
<=
1
if
icc
:
...
...
@@ -657,7 +657,7 @@ def _extractCreationGuard(root, encoding=None) :
else
:
return
None
def
_extractStateNodes
(
root
,
encoding
=
None
):
def
_extractStateNodes
(
root
,
encoding
=
'utf-8'
):
result
=
[]
...
...
@@ -718,7 +718,7 @@ def _extractStateNodes( root, encoding=None ):
return
result
def
_extractTransitionNodes
(
root
,
encoding
=
None
):
def
_extractTransitionNodes
(
root
,
encoding
=
'utf-8'
):
result
=
[]
...
...
@@ -751,7 +751,7 @@ def _extractTransitionNodes( root, encoding=None ):
return
result
def
_extractVariableNodes
(
root
,
encoding
=
None
):
def
_extractVariableNodes
(
root
,
encoding
=
'utf-8'
):
result
=
[]
...
...
@@ -780,7 +780,7 @@ def _extractVariableNodes( root, encoding=None ):
return
result
def
_extractWorklistNodes
(
root
,
encoding
=
None
):
def
_extractWorklistNodes
(
root
,
encoding
=
'utf-8'
):
result
=
[]
...
...
@@ -799,7 +799,7 @@ def _extractWorklistNodes( root, encoding=None ):
return
result
def
_extractScriptNodes
(
root
,
encoding
=
None
):
def
_extractScriptNodes
(
root
,
encoding
=
'utf-8'
):
result
=
[]
...
...
@@ -830,7 +830,7 @@ def _extractScriptNodes( root, encoding=None ):
return
result
def
_extractPermissionNodes
(
root
,
encoding
=
None
):
def
_extractPermissionNodes
(
root
,
encoding
=
'utf-8'
):
result
=
[]
...
...
@@ -840,7 +840,7 @@ def _extractPermissionNodes( root, encoding=None ):
return
result
def
_extractActionNode
(
parent
,
encoding
=
None
):
def
_extractActionNode
(
parent
,
encoding
=
'utf-8'
):
nodes
=
parent
.
getElementsByTagName
(
'action'
)
assert
len
(
nodes
)
<=
1
,
nodes
...
...
@@ -856,7 +856,7 @@ def _extractActionNode( parent, encoding=None ):
,
'icon'
:
_queryNodeAttribute
(
node
,
'icon'
,
''
,
encoding
)
}
def
_extractGuardNode
(
parent
,
encoding
=
None
):
def
_extractGuardNode
(
parent
,
encoding
=
'utf-8'
):
nodes
=
parent
.
getElementsByTagName
(
'guard'
)
assert
len
(
nodes
)
<=
1
,
nodes
...
...
@@ -883,7 +883,7 @@ def _extractGuardNode( parent, encoding=None ):
,
'expression'
:
expr_text
}
def
_extractDefaultNode
(
parent
,
encoding
=
None
):
def
_extractDefaultNode
(
parent
,
encoding
=
'utf-8'
):
nodes
=
parent
.
getElementsByTagName
(
'default'
)
assert
len
(
nodes
)
<=
1
,
nodes
...
...
@@ -918,7 +918,7 @@ def _extractDefaultNode( parent, encoding=None ):
_SEMICOLON_LIST_SPLITTER
=
re
.
compile
(
r';[ ]*'
)
def
_extractMatchNode
(
parent
,
encoding
=
None
):
def
_extractMatchNode
(
parent
,
encoding
=
'utf-8'
):
nodes
=
parent
.
getElementsByTagName
(
'match'
)
...
...
@@ -1242,7 +1242,7 @@ def _initDCWorkflowScripts( workflow, scripts, context ):
#
_marker
=
object
()
def
_queryNodeAttribute
(
node
,
attr_name
,
default
,
encoding
=
None
):
def
_queryNodeAttribute
(
node
,
attr_name
,
default
,
encoding
=
'utf-8'
):
""" Extract a string-valued attribute from node.
...
...
@@ -1260,7 +1260,7 @@ def _queryNodeAttribute( node, attr_name, default, encoding=None ):
return
value
def
_getNodeAttribute
(
node
,
attr_name
,
encoding
=
None
):
def
_getNodeAttribute
(
node
,
attr_name
,
encoding
=
'utf-8'
):
""" Extract a string-valued attribute from node.
"""
...
...
@@ -1294,7 +1294,7 @@ def _getNodeAttributeBoolean( node, attr_name ):
return
value
in
(
'true'
,
'yes'
,
'1'
)
def
_coalesceTextNodeChildren
(
node
,
encoding
=
None
):
def
_coalesceTextNodeChildren
(
node
,
encoding
=
'utf-8'
):
""" Concatenate all childe text nodes into a single string.
"""
...
...
@@ -1317,7 +1317,7 @@ def _coalesceTextNodeChildren( node, encoding=None ):
return
''
.
join
(
[
line
.
lstrip
()
for
line
in
joined
.
splitlines
(
True
)
]
).
rstrip
()
def
_extractDescriptionNode
(
parent
,
encoding
=
None
):
def
_extractDescriptionNode
(
parent
,
encoding
=
'utf-8'
):
d_nodes
=
parent
.
getElementsByTagName
(
'description'
)
if
d_nodes
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment