diff options
author | Ryan S. Arnold <ryan.arnold@linaro.org> | 2016-11-14 07:51:06 -0600 |
---|---|---|
committer | Ryan S. Arnold <ryan.arnold@linaro.org> | 2016-11-14 07:51:06 -0600 |
commit | 37fb851ed5120383c444384e58bcea039433af1e (patch) | |
tree | 3ccf6fc241fe5cbc92e34881ef5bd2d858889a89 | |
parent | 0a7e80155ef7f604505a364582ccef4f5c682c4a (diff) |
rn.py VerifyGCCSourceAction should 'raise IOError' when source isn't found.
Change-Id: Ic64c1f742305ba32a1edbb596a0b7d89a4c2fdfa
-rw-r--r-- | rn.py | 7 |
1 files changed, 1 insertions, 6 deletions
@@ -31,8 +31,6 @@ import traceback rnProj = [] # Cleanup the temporary project directory if necessary. - - def rncleanup(): if not rnProj: # This will be the case if the script is run via the test driver. @@ -41,7 +39,6 @@ def rncleanup(): print "Cleaning up Proj dir %s if possible." % rnProj[0].projdir rnProj[0].cleanup() - def generate(track, to_date, to_series, gccsource, persist): # Delay creating the Proj directory until now so that the parser (and # parser validation functions) can be tested in the unittests without @@ -128,8 +125,7 @@ class VerifyGCCSourceAction(argparse.Action): # We simply want to test that the directory exists. We'll prove that # it is a git directory in a later step. if not os.path.isdir(values): - sys.exit(2) - + raise IOError("The GCC source directory %s does not exist." % values) def str_to_datetime(datestr): # strptime will throw an exception if the input date is not a string or is @@ -141,7 +137,6 @@ def str_to_datetime(datestr): # Force the 'day' to 15 to unify comparisons. return inputdate.replace(day=15) - def create_parser(): parser = argparse.ArgumentParser( prog="rn.py", |