blob: 5928029df4f527567477e7a00a01b99813fdce39 [file] [log] [blame]
Filip Pytloun5a586cb2015-10-16 21:01:08 +02001From fbd22d42a20a0fdd53bc42fd27ad9f3d6af70f80 Mon Sep 17 00:00:00 2001
2From: Michael Kuty <6du1ro.n@gmail.com>
3Date: Fri, 16 Oct 2015 18:10:18 +0200
4Subject: [PATCH 1/2] Fix UndefinedVariableError, which had, uh, undefined
5 variables
6
7Signed-off-by: martin f. krafft <madduck@madduck.net>
8---
9 reclass/errors.py | 4 +++-
10 1 file changed, 3 insertions(+), 1 deletion(-)
11
12diff --git a/reclass/errors.py b/reclass/errors.py
13index 4da2bc3..ddb95fd 100644
14--- a/reclass/errors.py
15+++ b/reclass/errors.py
16@@ -131,9 +131,11 @@ class UndefinedVariableError(InterpolationError):
17 super(UndefinedVariableError, self).__init__(msg=None)
18 self._var = var
19 self._context = context
20+ var = property(lambda self: self._var)
21+ context = property(lambda self: self._context)
22
23 def _get_message(self):
24- msg = "Cannot resolve " + var.join(PARAMETER_INTERPOLATION_SENTINELS)
25+ msg = "Cannot resolve " + self._var.join(PARAMETER_INTERPOLATION_SENTINELS)
26 if self._context:
27 msg += ' in the context of %s' % self._context
28 return msg
29--
302.1.4
31