[downloader] Add colors to download progress

This commit is contained in:
pukkandan 2021-11-29 02:55:37 +05:30
parent b29165267f
commit 7578d77d8c
No known key found for this signature in database
GPG key ID: 0F00D95A001F4698
3 changed files with 31 additions and 11 deletions

View file

@ -78,6 +78,7 @@ class MultilinePrinterBase:
def __init__(self, stream=None, lines=1):
self.stream = stream
self.maximum = lines - 1
self._HAVE_FULLCAP = supports_terminal_sequences(stream)
def __enter__(self):
return self
@ -124,7 +125,6 @@ class MultilinePrinter(MultilinePrinterBase):
self.preserve_output = preserve_output
self._lastline = self._lastlength = 0
self._movelock = Lock()
self._HAVE_FULLCAP = supports_terminal_sequences(self.stream)
def lock(func):
@functools.wraps(func)