Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
slapos
Commits
32a74d46
Commit
32a74d46
authored
Aug 09, 2011
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid calling self.getMissingBusinessTemplateSet() twice.
parent
151a120e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
slapos/recipe/erp5/erp5.py
slapos/recipe/erp5/erp5.py
+3
-5
No files found.
slapos/recipe/erp5/erp5.py
View file @
32a74d46
...
...
@@ -152,13 +152,11 @@ class ERP5Updater(object):
found_dict
=
self
.
getSystemSignatureDict
(
"business_template_dict"
,
{})
return
set
(
self
.
business_template_list
).
difference
(
found_dict
)
def
isBusinessTemplateUpdated
(
self
):
return
len
(
self
.
getMissingBusinessTemplateSet
())
==
0
def
updateBusinessTemplateList
(
self
):
""" Update Business Template Configuration, including the repositories
"""
if
not
self
.
isBusinessTemplateUpdated
():
missing_business_template_set
=
self
.
getMissingBusinessTemplateSet
()
if
missing_business_template_set
:
# Before updating the business templates, it is required to make sure
# the repositories are updated, thus update them even if they are
# already present because there may be new business templates...
...
...
@@ -168,7 +166,7 @@ class ERP5Updater(object):
self
.
_setRepositoryList
(
repository_list
)
# Require to update Business template
self
.
_installBusinessTemplateList
(
list
(
self
.
getMissingBusinessTemplateSet
()
))
self
.
_installBusinessTemplateList
(
list
(
missing_business_template_set
))
return
True
return
False
...
...
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