Seems like test mode requires output_dir. Adding check (should output_dir be changed to a positional arg instead of switch?)

Change-Id: Icf81224e68c8febeef8b23de4e00a54906f4a1b2
This commit is contained in:
desbonne 2012-09-10 12:58:35 +01:00 committed by Manuel Desbonnet
parent 43ef14a241
commit 0036aa9662
1 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import jenkins_jobs.builder
import argparse
import ConfigParser
import logging
import sys
def main():
parser = argparse.ArgumentParser()
@ -53,6 +54,9 @@ def main():
options.name))
builder.update_job(options.path, options.name)
elif options.command == 'test':
if(not options.output_dir):
logger.error("You must specify an output dir (-o) in test mode")
sys.exit(1)
builder.update_job(options.path, options.name,
output_dir=options.output_dir)