Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.toolbox
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Łukasz Nowak
slapos.toolbox
Commits
73448779
Commit
73448779
authored
Mar 05, 2019
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[runner] cleanup: do not use list as a variable
parent
eeed319f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
slapos/runner/utils.py
slapos/runner/utils.py
+6
-7
No files found.
slapos/runner/utils.py
View file @
73448779
...
...
@@ -352,15 +352,14 @@ def config_SR_folder(config):
md5sum
=
md5digest
(
profile
)
link_to_folder
(
name
,
md5sum
)
# check other links
# XXX-Marco do not shadow 'list'
list
=
[]
software_link_list
=
[]
for
path
in
os
.
listdir
(
config
[
'software_link'
]):
cfg_path
=
os
.
path
.
join
(
config
[
'software_link'
],
path
,
config_name
)
if
os
.
path
.
exists
(
cfg_path
):
cfg
=
open
(
cfg_path
).
read
().
split
(
"#"
)
if
len
(
cfg
)
!=
2
:
continue
# there is a broken config file
list
.
append
(
cfg
[
1
])
software_link_
list
.
append
(
cfg
[
1
])
if
os
.
path
.
exists
(
config
[
'software_root'
]):
folder_list
=
os
.
listdir
(
config
[
'software_root'
])
else
:
...
...
@@ -368,14 +367,14 @@ def config_SR_folder(config):
if
not
folder_list
:
return
for
folder
in
folder_list
:
if
folder
in
list
:
if
folder
in
software_link_
list
:
continue
# this folder is already registered
else
:
link_to_folder
(
folder
,
folder
)
def
loadSoftwareRList
(
config
):
"""Return list (of dict) of Software Release from symbolik SR folder"""
list
=
[]
sr_
list
=
[]
config_name
=
'slaprunner.config'
for
path
in
os
.
listdir
(
config
[
'software_link'
]):
cfg_path
=
os
.
path
.
join
(
config
[
'software_link'
],
path
,
config_name
)
...
...
@@ -383,8 +382,8 @@ def loadSoftwareRList(config):
cfg
=
open
(
cfg_path
).
read
().
split
(
"#"
)
if
len
(
cfg
)
!=
2
:
continue
# there is a broken config file
list
.
append
(
dict
(
md5
=
cfg
[
1
],
path
=
cfg
[
0
],
title
=
path
))
return
list
sr_
list
.
append
(
dict
(
md5
=
cfg
[
1
],
path
=
cfg
[
0
],
title
=
path
))
return
sr_
list
def
isInstanceRunning
(
config
):
...
...
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