Switch to using extra_vars for survey variables, fix up some unit tests

related to that and some issues with system jobs
This commit is contained in:
Matthew Jones
2014-12-17 16:04:25 -05:00
parent 6e3cd5bc54
commit d4879506c2
5 changed files with 44 additions and 36 deletions

View File

@@ -78,7 +78,10 @@ class VarsDictProperty(object):
def __get__(self, obj, type=None):
if obj is None:
return self
v = getattr(obj, self.field).encode('utf-8')
v = getattr(obj, self.field)
if hasattr(v, 'items'):
return v
v = v.encode('utf-8')
d = None
try:
d = json.loads(v.strip() or '{}')