Bug 1296530 - Add a repr() for Option. r?chmanchester
--- a/python/mozbuild/mozbuild/configure/options.py
+++ b/python/mozbuild/mozbuild/configure/options.py
@@ -365,16 +365,20 @@ class Option(object):
"'%s' is not one of %s"
% (val, ', '.join("'%s'" % c for c in self.choices)))
if relative_result is not None:
values = PositiveOptionValue(relative_result, origin=origin)
return values
+ def __repr__(self):
+ return '<%s.%s [%s]>' % (self.__class__.__module__,
+ self.__class__.__name__, self.option)
+
class CommandLineHelper(object):
'''Helper class to handle the various ways options can be given either
on the command line of through the environment.
For instance, an Option('--foo', env='FOO') can be passed as --foo on the
command line, or as FOO=1 in the environment *or* on the command line.