Made test running environment more robust and consistent.

This commit is contained in:
Jonathan Piacenti 2014-11-04 20:23:46 -06:00
parent b106e7418a
commit 52fa4dd60b
10 changed files with 291 additions and 172 deletions

View file

@ -1378,7 +1378,7 @@ class CmdSetAttribute(ObjManipCommand):
def set_attr(self, obj, attr, value):
try:
obj.attributes.add(attr, value)
return "\nCreated attribute %s/%s = %s" % (obj.name, attr, value)
return "\nCreated attribute %s/%s = %s" % (obj.name, attr, repr(value))
except SyntaxError:
# this means literal_eval tried to parse a faulty string
return ("\n{RCritical Python syntax error in your value. Only "