summaryrefslogtreecommitdiffstats
path: root/ipalib/frontend.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2011-02-09 17:02:10 -0500
committerRob Crittenden <rcritten@redhat.com>2011-02-10 13:52:29 -0500
commitc187b276ad60e06be260899889628b7979f267e4 (patch)
tree816fea7649069241d1a65fc194afa9e42bae7a7e /ipalib/frontend.py
parentf34c0ab91673ad12edd937e6f3b0e97811f06d6e (diff)
downloadfreeipa-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.py4
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)