Fixed help

This commit is contained in:
jpic 2020-02-12 11:55:19 +01:00
parent b08d5e1a34
commit e469455bc0

View File

@ -19,8 +19,10 @@ class ConsoleScript(cli2.ConsoleScript):
import inspect
from podctl.podfile import Podfile
self.podfile = Podfile.factory(os.getenv('PODFILE', 'pod.py'))
for name in self.podfile.pod.scripts.keys():
self[name] = cli2.Callable(name, self.podfile.pod.script(name),)
for name, script in self.podfile.pod.scripts.items():
cb = self.podfile.pod.script(name)
cb.__doc__ = inspect.getdoc(script)
self[name] = cli2.Callable(name, cb)
return super().__call__(*args, **kwargs)
def call(self, command):