Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Colas Pomies
LbNightlyTools
Commits
f6ba1226
Commit
f6ba1226
authored
Apr 27, 2015
by
cpomies
Browse files
Deleted parameter preconditions in property file
parent
724648d9
Changes
2
Hide whitespace changes
Inline
Side-by-side
python/LbNightlyTools/CheckSlotPreconditions.py
View file @
f6ba1226
...
...
@@ -20,6 +20,14 @@ import os
from
LbNightlyTools.Configuration
import
load
from
LbNightlyTools.Utils
import
JobParams
def
parseConfigFile
(
path
):
'''
Extract required information from the configuration file.
'''
data
=
load
(
path
)
return
data
.
get
(
u
'preconditions'
,
[])
import
LbUtils.Script
class
Script
(
LbUtils
.
Script
.
PlainScript
):
'''
...
...
@@ -64,7 +72,6 @@ class Script(LbUtils.Script.PlainScript):
slot_build_id
=
os
.
environ
[
'slot_build_id'
],
platform
=
platform
,
os_label
=
os_label
,
preconditions
=
preconds
))
+
'
\n
'
)
self
.
log
.
debug
(
'%s written'
,
output_file_name
)
...
...
python/LbNightlyTools/SlotPreconditions.py
View file @
f6ba1226
...
...
@@ -88,11 +88,7 @@ class Script(LbUtils.Script.PlainScript):
if
len
(
self
.
args
)
!=
1
:
self
.
parser
.
error
(
'wrong number of arguments'
)
if
os
.
environ
.
has_key
(
'preconditions'
)
\
and
os
.
environ
[
'preconditions'
]
!=
''
:
preconds
=
dict
(
os
.
environ
[
'preconditions'
])
else
:
preconds
=
parseConfigFile
(
self
.
args
[
0
])
preconds
=
parseConfigFile
(
self
.
args
[
0
])
from
LbNightlyTools.Utils
import
setDayNamesEnv
setDayNamesEnv
()
...
...
Write
Preview
Supports
Markdown
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