Use batch writing mode in the help command
This commit is contained in:
parent
7983187818
commit
ec259d6aea
@ -64,10 +64,12 @@ class Command(BaseCommand):
|
|||||||
self.console.write(cmd.__doc__ or 'No help for this command')
|
self.console.write(cmd.__doc__ or 'No help for this command')
|
||||||
else:
|
else:
|
||||||
max_length = max( len(k) for k in self._commands)
|
max_length = max( len(k) for k in self._commands)
|
||||||
|
self.console.set_batch_write(True)
|
||||||
for cmd in sorted(self._commands):
|
for cmd in sorted(self._commands):
|
||||||
self.console.write("{!info!}" + cmd + "{!input!} - " + self._commands[cmd].__doc__ or '')
|
self.console.write("{!info!}" + cmd + "{!input!} - " + self._commands[cmd].__doc__ or '')
|
||||||
self.console.write(" ")
|
self.console.write(" ")
|
||||||
self.console.write('For help on a specific command, use "<command> --help"')
|
self.console.write('For help on a specific command, use "<command> --help"')
|
||||||
|
self.console.set_batch_write(False)
|
||||||
|
|
||||||
return deferred
|
return deferred
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user