Skip to content

Conversation

@tosky
Copy link
Contributor

@tosky tosky commented Feb 25, 2023

The Tee class is used as stdout-like object, but
it was missing the flush method. That method is called by some code which is replaced by instances of Tee, leading to errors:

Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "<...>/tests/test_options.py", line 94, in test_old_var_compatibility
p.program('export', {'--template': 'foobar-%s-1234.pot'})
[...]
File "/usr/lib/python3/dist-packages/colorama/ansitowin32.py", line 177, in write
self.write_and_convert(text)
File "/usr/lib/python3/dist-packages/colorama/ansitowin32.py", line 202, in write_and_convert
self.write_plain_text(text, cursor, start)
File "/usr/lib/python3/dist-packages/colorama/ansitowin32.py", line 211, in write_plain_text
self.wrapped.flush()
^^^^^^^^^^^^^^^^^^
AttributeError: 'Tee' object has no attribute 'flush'

The Tee class is used as stdout-like object, but
it was missing the flush method. That method is called
by some code which is replaced by instances of Tee,
leading to errors:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "<...>/tests/test_options.py", line 94, in test_old_var_compatibility
    p.program('export', {'--template': 'foobar-%s-1234.pot'})
  [...]
  File "/usr/lib/python3/dist-packages/colorama/ansitowin32.py", line 177, in write
    self.write_and_convert(text)
  File "/usr/lib/python3/dist-packages/colorama/ansitowin32.py", line 202, in write_and_convert
    self.write_plain_text(text, cursor, start)
  File "/usr/lib/python3/dist-packages/colorama/ansitowin32.py", line 211, in write_plain_text
    self.wrapped.flush()
    ^^^^^^^^^^^^^^^^^^
AttributeError: 'Tee' object has no attribute 'flush'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant