From 79269731ea9220fc42181bafc635163032a97820 Mon Sep 17 00:00:00 2001 From: Claudio-Daniel Freire Date: Thu, 28 Jul 2011 17:12:40 +0200 Subject: [PATCH] Use repr for showing invalid values, helps detecting type mismatches --- src/nepi/core/testbed_impl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nepi/core/testbed_impl.py b/src/nepi/core/testbed_impl.py index 88217b0b..fd947c0b 100644 --- a/src/nepi/core/testbed_impl.py +++ b/src/nepi/core/testbed_impl.py @@ -556,7 +556,7 @@ class TestbedController(execute.TestbedController): def _validate_testbed_value(self, name, value): if not self._attributes.is_attribute_value_valid(name, value): - raise AttributeError("Invalid value %s for testbed attribute %s" % \ + raise AttributeError("Invalid value %r for testbed attribute %s" % \ (value, name)) def _validate_box_attribute(self, guid, name): @@ -568,7 +568,7 @@ class TestbedController(execute.TestbedController): def _validate_box_value(self, guid, name, value): factory = self._get_factory(guid) if not factory.box_attributes.is_attribute_value_valid(name, value): - raise AttributeError("Invalid value %s for attribute %s" % \ + raise AttributeError("Invalid value %r for attribute %s" % \ (value, name)) def _validate_factory_attribute(self, guid, name): @@ -580,7 +580,7 @@ class TestbedController(execute.TestbedController): def _validate_factory_value(self, guid, name, value): factory = self._get_factory(guid) if not factory.is_attribute_value_valid(name, value): - raise AttributeError("Invalid value %s for attribute %s" % \ + raise AttributeError("Invalid value %r for attribute %s" % \ (value, name)) def _validate_trace(self, guid, trace_name): -- 2.47.0