mirror of
https://github.com/samsonjs/vdirsyncer.git
synced 2026-03-28 09:25:50 +00:00
Don't use click's newline echoing
click.echo does two write calls, which get flushed immediately. Using this in multiprocessing might make output overlap. Using a single write-call apparently resolves that issue, although i don't know why. A proper solution would be to use locks, but e.g. multiprocessing's logger doesn't seem have nearly as much flexibility as others. For now it seems to be bugfree enough.
This commit is contained in:
parent
a6e2f23bbc
commit
28b649dec9
1 changed files with 1 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ class ColorFormatter(logging.Formatter):
|
|||
|
||||
class ClickStream(object):
|
||||
def write(self, string):
|
||||
click.echo(string.rstrip())
|
||||
click.echo(string, nl=False)
|
||||
|
||||
|
||||
stdout_handler = logging.StreamHandler(ClickStream())
|
||||
|
|
|
|||
Loading…
Reference in a new issue