| From fbd22d42a20a0fdd53bc42fd27ad9f3d6af70f80 Mon Sep 17 00:00:00 2001 |
| From: Michael Kuty <6du1ro.n@gmail.com> |
| Date: Fri, 16 Oct 2015 18:10:18 +0200 |
| Subject: [PATCH 1/2] Fix UndefinedVariableError, which had, uh, undefined |
| variables |
| |
| Signed-off-by: martin f. krafft <madduck@madduck.net> |
| --- |
| reclass/errors.py | 4 +++- |
| 1 file changed, 3 insertions(+), 1 deletion(-) |
| |
| diff --git a/reclass/errors.py b/reclass/errors.py |
| index 4da2bc3..ddb95fd 100644 |
| --- a/reclass/errors.py |
| +++ b/reclass/errors.py |
| @@ -131,9 +131,11 @@ class UndefinedVariableError(InterpolationError): |
| super(UndefinedVariableError, self).__init__(msg=None) |
| self._var = var |
| self._context = context |
| + var = property(lambda self: self._var) |
| + context = property(lambda self: self._context) |
| |
| def _get_message(self): |
| - msg = "Cannot resolve " + var.join(PARAMETER_INTERPOLATION_SENTINELS) |
| + msg = "Cannot resolve " + self._var.join(PARAMETER_INTERPOLATION_SENTINELS) |
| if self._context: |
| msg += ' in the context of %s' % self._context |
| return msg |
| -- |
| 2.1.4 |
| |