diff options
author | Jason Gerard DeRose <jderose@redhat.com> | 2009-05-12 18:47:19 -0600 |
---|---|---|
committer | Rob Crittenden <rcritten@redhat.com> | 2009-05-13 14:22:09 -0400 |
commit | 87480b7bdea7cfe99d0c3d964fd65b82dbaf6a6c (patch) | |
tree | be9dc3e61549a2472f422e271f9472b3b649de23 /ipalib/__init__.py | |
parent | 252e9b61eba65743b834f799f4f2321f66b12676 (diff) | |
download | freeipa-87480b7bdea7cfe99d0c3d964fd65b82dbaf6a6c.tar.gz freeipa-87480b7bdea7cfe99d0c3d964fd65b82dbaf6a6c.tar.xz freeipa-87480b7bdea7cfe99d0c3d964fd65b82dbaf6a6c.zip |
Re-enable doctest, fix broken docstrings
Diffstat (limited to 'ipalib/__init__.py')
-rw-r--r-- | ipalib/__init__.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/ipalib/__init__.py b/ipalib/__init__.py index 0c36aa18b..7108f65ec 100644 --- a/ipalib/__init__.py +++ b/ipalib/__init__.py @@ -601,7 +601,7 @@ For example, say we setup a command like this: ... textui.print_count(result, format) ... >>> api = create_api() ->>> api.env.in_server = True # We want to execute, not forward. +>>> api.bootstrap(in_server=True) # We want to execute, not forward >>> api.register(show_items) >>> api.finalize() @@ -694,14 +694,7 @@ After `API.bootstrap()` has been called, the `Env` instance will be populated with all the environment information used by the built-in plugins. This will be called before any plugins are registered, so plugin authors can assume these variables will all exist by the time the module containing their -plugin (or plugins) is imported. For example: - ->>> api = create_api() ->>> len(api.env) -1 ->>> api.bootstrap(in_server=True) # We want to execute, not forward ->>> len(api.env) -39 +plugin (or plugins) is imported. `Env._bootstrap()`, which is called by `API.bootstrap()`, will create several run-time variables that connot be overriden in configuration files or through @@ -747,8 +740,10 @@ For example: ... """Print message of the day.""" ... ... def execute(self): -... return self.env.message_of_the_day +... return self.env.message ... +>>> api = create_api() +>>> api.bootstrap(in_server=True, message='Hello, world!') >>> api.register(motd) >>> api.finalize() >>> api.Command.motd() |