Fix example commands

This commit is contained in:
Ian Adam Naval 2015-02-20 22:54:09 -05:00
parent 9324774208
commit 80ac53e72e

View File

@ -4,17 +4,17 @@ from commands import BaseCommand, register_cmd
class example_cmd(BaseCommand): class example_cmd(BaseCommand):
def __call__(self, *args, **kwargs): def __call__(self, *args, **kwargs):
def input_generator(): def output_generator():
yield 'example' yield b'example'
yield 'command' yield b'command'
return input_generator return output_generator()
@register_cmd @register_cmd
class echo(BaseCommand): class echo(BaseCommand):
def __call__(self, *args, **kwargs): def __call__(self, *args, **kwargs):
def input_generator(): def output_generator():
for line in self.input_cmd(): for line in self.input_cmd():
yield line yield line
return input_generator return output_generator()