From 5c9437b9e683a5f721595a5e312e4d61a11b60c7 Mon Sep 17 00:00:00 2001 From: Jason Gerard DeRose Date: Tue, 13 Oct 2009 22:23:19 -0600 Subject: Removed util.add_global_options() and frontend.Application --- ipalib/frontend.py | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'ipalib/frontend.py') diff --git a/ipalib/frontend.py b/ipalib/frontend.py index 622c4276..b13ffed4 100644 --- a/ipalib/frontend.py +++ b/ipalib/frontend.py @@ -1015,44 +1015,3 @@ class Property(Attribute): attr = getattr(self, name) if is_rule(attr): yield attr - - -class Application(Command): - """ - Base class for commands register by an external application. - - Special commands that only apply to a particular application built atop - `ipalib` should subclass from ``Application``. - - Because ``Application`` subclasses from `Command`, plugins that subclass - from ``Application`` with be available in both the ``api.Command`` and - ``api.Application`` namespaces. - """ - - __public__ = frozenset(( - 'application', - 'set_application' - )).union(Command.__public__) - __application = None - - def __get_application(self): - """ - Returns external ``application`` object. - """ - return self.__application - application = property(__get_application) - - def set_application(self, application): - """ - Sets the external application object to ``application``. - """ - if self.__application is not None: - raise AttributeError( - '%s.application can only be set once' % self.name - ) - if application is None: - raise TypeError( - '%s.application cannot be None' % self.name - ) - object.__setattr__(self, '_Application__application', application) - assert self.application is application -- cgit