Don't print the template filename and line number in error messages.

The template filename and line number do not correspond to the filename
and line number of the actual template files, because they are
representing the dynamically rendered template, not the text files
on the disk, so printing it out, when an error occurs, may be misleading.
This commit is contained in:
Martin Gracik 2010-02-24 09:19:53 +01:00
parent a4c638f132
commit 88969ae0db
1 changed files with 4 additions and 4 deletions

View File

@ -79,8 +79,8 @@ class BaseImageClass(BaseLoraxClass):
func = getattr(self, func, None)
if not func:
err = "{0}:{1}: invalid command: {2}"
err = err.format(template_file, lineno, line)
err = "invalid command: {0}"
err = err.format(line)
self.perror(err)
else:
try:
@ -88,8 +88,8 @@ class BaseImageClass(BaseLoraxClass):
self.pdebug(msg)
func(*args)
except TypeError:
err = "{0}:{1}: invalid command syntax: {2}"
err = err.format(template_file, lineno, line)
err = "invalid command syntax: {0}"
err = err.format(line)
self.perror(err)
def makedirs(self, *dirs):