API.env is now an Env instance rather than an Environment instance

This commit is contained in:
Jason Gerard DeRose
2008-10-27 01:35:40 -06:00
parent 25a7df9615
commit d76202fea3
4 changed files with 11 additions and 8 deletions

View File

@@ -668,7 +668,7 @@ class Command(plugable.Plugin):
on the nearest IPA server and the actual work this command
performs is executed remotely.
"""
if self.api.env.server_context:
if self.api.env.in_server:
target = self.execute
else:
target = self.forward

View File

@@ -29,7 +29,8 @@ import re
import inspect
import errors
from errors import check_type, check_isinstance
from config import Environment
from config import Environment, Env
import constants
import util
@@ -713,7 +714,7 @@ class API(DictProxy):
self.__d = dict()
self.__done = set()
self.register = Registrar(*allowed)
self.env = Environment()
self.env = Env
super(API, self).__init__(self.__d)
def __doing(self, name):