summaryrefslogtreecommitdiffstats
path: root/ipalib
diff options
context:
space:
mode:
Diffstat (limited to 'ipalib')
-rw-r--r--ipalib/frontend.py1
-rw-r--r--ipalib/util.py9
2 files changed, 10 insertions, 0 deletions
diff --git a/ipalib/frontend.py b/ipalib/frontend.py
index 56c4ea01..87126a44 100644
--- a/ipalib/frontend.py
+++ b/ipalib/frontend.py
@@ -227,6 +227,7 @@ class Param(plugable.ReadOnly):
)
def __init__(self, name, **override):
+ self.__override = override
if not ('required' in override or 'multivalue' in override):
(name, kw_from_spec) = parse_param_spec(name)
override.update(kw_from_spec)
diff --git a/ipalib/util.py b/ipalib/util.py
index 9bc43254..89e2c5a7 100644
--- a/ipalib/util.py
+++ b/ipalib/util.py
@@ -137,3 +137,12 @@ class LogFormatter(logging.Formatter):
Log formatter that uses UTC for all timestamps.
"""
converter = time.gmtime
+
+
+def make_repr(name, *args, **kw):
+ """
+ Construct a standard representation of a class instance.
+ """
+ args = [repr(a) for a in args]
+ kw = ['%s=%r' % (k, kw[k]) for k in sorted(kw)]
+ return '%s(%s)' % (name, ', '.join(args + kw))