Skip to content

Commit

Permalink
Merge pull request #113 from theotherjimmy/error-bad-source
Browse files Browse the repository at this point in the history
added a check for existance of sources
  • Loading branch information
sg- committed May 20, 2016
2 parents 23d77e4 + f44b8fc commit 59f5751
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/make.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import sys
from time import sleep
from shutil import copy
from os.path import join, abspath, dirname
from os.path import join, abspath, dirname, isfile, isdir

# Be sure that the tools directory is in the search path
ROOT = abspath(join(dirname(__file__), ".."))
Expand All @@ -46,7 +46,6 @@
except:
ps = object()


if __name__ == '__main__':
# Parse Options
parser = get_default_options_parser()
Expand Down Expand Up @@ -167,6 +166,11 @@

(options, args) = parser.parse_args()

for path in options.source_dir :
if not isfile(path) and not isdir(path) :
args_error(parser, "[ERROR] you passed \"{}\" to --source, which does not exist".
format(path))

# Print available tests in order and exit
if options.list_tests is True:
print '\n'.join(map(str, sorted(TEST_MAP.values())))
Expand Down

0 comments on commit 59f5751

Please sign in to comment.