From e3ac7630eb0bf07873f7c461e6758173fbf81dd8 Mon Sep 17 00:00:00 2001 From: Thomas Nagy Date: Wed, 21 Oct 2015 01:08:14 +0200 Subject: [PATCH] Clearer error message when folders do not exist - Issue 1643 --- waflib/Context.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/waflib/Context.py b/waflib/Context.py index e879087b..d057e256 100644 --- a/waflib/Context.py +++ b/waflib/Context.py @@ -307,6 +307,10 @@ class Context(ctx): elif not node: if not mandatory: continue + try: + os.listdir(d) + except OSError: + raise Errors.WafError('Cannot read the folder %r' % d) raise Errors.WafError('No wscript file in directory %s' % d) def exec_command(self, cmd, **kw):