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
5fe67cf7
Commit
5fe67cf7
authored
Nov 26, 2024
by
Rafael Monnerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Py3: Use six.iteritems
parent
2ba60d56
Pipeline
#38263
failed with stage
in 0 seconds
Changes
2
Pipelines
1
Hide 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 @
5fe67cf7
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 @
5fe67cf7
...
@@ -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
...
@@ -372,7 +373,7 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
...
@@ -372,7 +373,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
...
@@ -412,7 +413,7 @@ def makeTestSlapOSCodingStyleTestCase(tested_business_template):
...
@@ -412,7 +413,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