diff options
author | Rob Crittenden <rcritten@redhat.com> | 2011-02-09 17:02:10 -0500 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2011-02-10 13:52:29 -0500 |
commit | c187b276ad60e06be260899889628b7979f267e4 (patch) | |
tree | 816fea7649069241d1a65fc194afa9e42bae7a7e /ipalib/frontend.py | |
parent | f34c0ab91673ad12edd937e6f3b0e97811f06d6e (diff) | |
download | freeipa-c187b276ad60e06be260899889628b7979f267e4.tar.gz freeipa-c187b276ad60e06be260899889628b7979f267e4.tar.xz freeipa-c187b276ad60e06be260899889628b7979f267e4.zip |
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.
Diffstat (limited to 'ipalib/frontend.py')
-rw-r--r-- | ipalib/frontend.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |