From: garyo Date: Sun, 20 Dec 2009 16:04:13 +0000 (+0000) Subject: Add a message to the UserError raised when trying to do a Dir lookup with create... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5f6735b805409aec2b3d334c23d97d0d74a75fe5;p=scons.git 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. git-svn-id: http://scons.tigris.org/svn/scons/trunk@4570 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/engine/SCons/Node/FS.py b/src/engine/SCons/Node/FS.py index 9fdac794..88248d74 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)