lorax: check for output directory early and quit

This commit is contained in:
Brian C. Lane 2011-12-20 18:46:30 -08:00
parent 10acb5e5b9
commit a98134b316

View File

@ -93,6 +93,9 @@ def main(args):
or not opts.source or not outputdir:
parser.error("missing one or more required arguments")
if os.path.exists(outputdir):
parser.error("output directory should not exist.")
# create the temporary directory for lorax
tempdir = tempfile.mkdtemp(prefix="lorax.", dir=tempfile.gettempdir())