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:
parent
43ef14a241
commit
0036aa9662
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue