diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2009-12-20 16:04:13 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2009-12-20 16:04:13 (GMT) |
commit | 74b0e0fa878bf98e1bb074cd5292a6808ba33f97 (patch) | |
tree | 847f0266521e8831021fb8fffddb0d85a02d351c | |
parent | 792466a85e2e2d9967dc2531d80ec5c2cf8b16a6 (diff) | |
download | SCons-74b0e0fa878bf98e1bb074cd5292a6808ba33f97.zip SCons-74b0e0fa878bf98e1bb074cd5292a6808ba33f97.tar.gz SCons-74b0e0fa878bf98e1bb074cd5292a6808ba33f97.tar.bz2 |
Add a message to the UserError raised when trying to do a Dir lookup with create=False. Should not normally happen, but it did to me, and it is better to have some explanatory message when it happens rather than failing silently.
-rw-r--r-- | src/engine/SCons/Node/FS.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 9fdac79..88248d7 100644 --- a/src/engine/SCons/Node/FS.py +++ b/src/engine/SCons/Node/FS.py @@ -2110,7 +2110,8 @@ class RootDir(Dir): result = self._lookupDict[k] except KeyError: if not create: - raise SCons.Errors.UserError + msg = "No such file or directory: '%s' in '%s' (and create is False)" % (p, str(self)) + raise SCons.Errors.UserError, msg # There is no Node for this path name, and we're allowed # to create it. dir_name, file_name = os.path.split(p) |