Commit f6ba1226 authored by cpomies's avatar cpomies
Browse files

Deleted parameter preconditions in property file

parent 724648d9
...@@ -20,6 +20,14 @@ import os ...@@ -20,6 +20,14 @@ import os
from LbNightlyTools.Configuration import load from LbNightlyTools.Configuration import load
from LbNightlyTools.Utils import JobParams 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 import LbUtils.Script
class Script(LbUtils.Script.PlainScript): class Script(LbUtils.Script.PlainScript):
''' '''
...@@ -64,7 +72,6 @@ class Script(LbUtils.Script.PlainScript): ...@@ -64,7 +72,6 @@ class Script(LbUtils.Script.PlainScript):
slot_build_id=os.environ['slot_build_id'], slot_build_id=os.environ['slot_build_id'],
platform=platform, platform=platform,
os_label=os_label, os_label=os_label,
preconditions=preconds
)) + '\n') )) + '\n')
self.log.debug('%s written', output_file_name) self.log.debug('%s written', output_file_name)
......
...@@ -88,11 +88,7 @@ class Script(LbUtils.Script.PlainScript): ...@@ -88,11 +88,7 @@ class Script(LbUtils.Script.PlainScript):
if len(self.args) != 1: if len(self.args) != 1:
self.parser.error('wrong number of arguments') self.parser.error('wrong number of arguments')
if os.environ.has_key('preconditions') \ preconds = parseConfigFile(self.args[0])
and os.environ['preconditions'] != '':
preconds = dict(os.environ['preconditions'])
else:
preconds = parseConfigFile(self.args[0])
from LbNightlyTools.Utils import setDayNamesEnv from LbNightlyTools.Utils import setDayNamesEnv
setDayNamesEnv() setDayNamesEnv()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment