Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Seems like test mode requires output_dir. Adding check (should output…
…_dir be changed to a positional arg instead of switch?)
  • Loading branch information
desbonne committed Sep 10, 2012
1 parent f97549b commit 09cda6f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions jenkins-jobs
Expand Up @@ -4,6 +4,7 @@ import jenkins_jobs.builder
import argparse
import ConfigParser
import logging
import sys

def main():
parser = argparse.ArgumentParser()
Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit 09cda6f

Please sign in to comment.