Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Rafael Monnerat
slapos.core
Commits
c0853f7b
Commit
c0853f7b
authored
Nov 26, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Py3: Use six.iteritems
parent
29f4e2c7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
3 deletions
+5
-3
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/TemplateTool_checkSlapOSPASConsistency.py
...ins/slapos_erp5/TemplateTool_checkSlapOSPASConsistency.py
+2
-1
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
...Item/portal_components/test.erp5.testSlapOSCodingStyle.py
+3
-2
No files found.
master/bt5/slapos_erp5/SkinTemplateItem/portal_skins/slapos_erp5/TemplateTool_checkSlapOSPASConsistency.py
View file @
c0853f7b
import
six
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
slapos_plugin_dict
=
{
slapos_plugin_dict
=
{
'IExtractionPlugin'
:
[
'IExtractionPlugin'
:
[
...
@@ -23,7 +24,7 @@ def mergePASDictDifference(portal, d, fixit):
...
@@ -23,7 +24,7 @@ def mergePASDictDifference(portal, d, fixit):
plugins
=
portal
.
acl_users
.
plugins
plugins
=
portal
.
acl_users
.
plugins
plugin_type_info
=
plugins
.
listPluginTypeInfo
()
plugin_type_info
=
plugins
.
listPluginTypeInfo
()
error_list
=
[]
error_list
=
[]
for
plugin
,
active_list
in
d
.
iteritems
(
):
for
plugin
,
active_list
in
six
.
iteritems
(
d
):
plugin_info
=
[
q
for
q
in
plugin_type_info
if
q
[
'id'
]
==
plugin
][
0
]
plugin_info
=
[
q
for
q
in
plugin_type_info
if
q
[
'id'
]
==
plugin
][
0
]
found_list
=
plugins
.
listPlugins
(
plugin_info
[
'interface'
])
found_list
=
plugins
.
listPlugins
(
plugin_info
[
'interface'
])
meta_type_list
=
[
q
[
1
].
meta_type
for
q
in
found_list
]
meta_type_list
=
[
q
[
1
].
meta_type
for
q
in
found_list
]
...
...
master/bt5/slapos_erp5/TestTemplateItem/portal_components/test.erp5.testSlapOSCodingStyle.py
View file @
c0853f7b
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
##############################################################################
##############################################################################
import
unittest
import
unittest
import
six
from
Products.ERP5Type.tests.CodingStyleTestCase
import
CodingStyleTestCase
from
Products.ERP5Type.tests.CodingStyleTestCase
import
CodingStyleTestCase
from
Products.ERP5Type
import
CodingStyle
from
Products.ERP5Type
import
CodingStyle
...
@@ -374,7 +375,7 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
...
@@ -374,7 +375,7 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
if
skin_id
in
skin_id_list
:
if
skin_id
in
skin_id_list
:
try
:
try
:
document
=
self
.
portal
.
portal_skins
[
skin_id
][
document_id
]
document
=
self
.
portal
.
portal_skins
[
skin_id
][
document_id
]
for
_
,
content
in
content_dict
.
iteritems
(
):
for
_
,
content
in
six
.
iteritems
(
content_dict
):
if
document
.
getId
()
in
content
:
if
document
.
getId
()
in
content
:
message_list
.
append
(
skin_path
)
message_list
.
append
(
skin_path
)
break
break
...
@@ -414,7 +415,7 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
...
@@ -414,7 +415,7 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
continue
continue
found
=
0
found
=
0
for
_
,
content
in
content_dict
.
iteritems
(
):
for
_
,
content
in
six
.
iteritems
(
content_dict
):
if
document
.
getId
()
in
content
:
if
document
.
getId
()
in
content
:
found
=
1
found
=
1
break
break
...
...
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