~linaro-automation/linaro-android-build-tools/trunk

« back to all changes in this revision

Viewing changes to utils/mangle-jobs/cron-set-no-weekend.mangle

  • Committer: Paul Sokolovsky
  • Date: 2013-12-10 17:07:20 UTC
  • Revision ID: paul.sokolovsky@linaro.org-20131210170720-vwx83ujrxk2itejn
Most of utils migrated to https://git.linaro.org/infrastructure/linaro-jenkins-tools.git

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Set cron weekend spec to skip Sat
2
 
 
3
 
 
4
 
def mangle(tree):
5
 
    nodes = tree.xpath("//hudson.triggers.TimerTrigger/spec")
6
 
    if not nodes:
7
 
        return False
8
 
    spec = nodes[0].text.split()
9
 
    if spec[-1] != "*":
10
 
        return False
11
 
    spec[-1] = "0-5"
12
 
    nodes[0].text = " ".join(spec)