From c187b276ad60e06be260899889628b7979f267e4 Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Wed, 9 Feb 2011 17:02:10 -0500 Subject: Fix test failures caused by the performance patch. It isn't safe to assume there is an environment or mode in any given object. Only skip the extra work if the object explicitly has production in it. --- ipalib/frontend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ipalib/frontend.py') diff --git a/ipalib/frontend.py b/ipalib/frontend.py index cf78d441..b9b75372 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -24,7 +24,7 @@ Base classes for all front-end plugins. import re import inspect from base import lock, check_name, NameSpace -from plugable import Plugin +from plugable import Plugin, is_production_mode from parameters import create_param, parse_param_spec, Param, Str, Flag, Password from util import make_repr from output import Output, Entry, ListOfEntries @@ -351,7 +351,7 @@ class HasParam(Plugin): self._filter_param_by_context(name, env), sort=False ) - if self.env.mode != 'production': + if not is_production_mode(self): check = getattr(self, 'check_' + name, None) if callable(check): check(namespace) -- cgit