From 791a23ffbba7d22f2b66a04868f76fd97740d618 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Mon, 4 Jan 2010 23:14:52 +0000 Subject: - Make ``paster bfgshell`` and ``paster create -t bfg_xxx`` work on Jython (fix minor incompatibility with treatment of ``__doc__`` at the class level). --- repoze/bfg/paster.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'repoze') diff --git a/repoze/bfg/paster.py b/repoze/bfg/paster.py index 967d9b72e..452c13fc5 100644 --- a/repoze/bfg/paster.py +++ b/repoze/bfg/paster.py @@ -65,7 +65,6 @@ class BFGShellCommand(Command): """ summary = "Open an interactive shell with a repoze.bfg app loaded" - usage = '\n' + __doc__ min_args = 2 max_args = 2 @@ -82,6 +81,12 @@ class BFGShellCommand(Command): IPShell = IPShell # for testing verbose = 3 + def __init__(self, *arg, **kw): + # needs to be in constructor to support Jython (used to be at class + # scope as ``usage = '\n' + __doc__``. + self.usage = '\n' + self.__doc__ + Command.__init__(self, *arg, **kw) + def command(self): cprt =('Type "help" for more information. "root" is the BFG app ' 'root object.') -- cgit v1.2.3