[utils] Fix bug in 0b9c08b47b

* Cache of `supports_terminal_sequences` must be reset after enabling VT mode
* and move `windows_enable_vt_mode` to utils to avoid cyclic imports
This commit is contained in:
pukkandan
2022-05-20 03:02:25 +05:30
parent b801cd7179
commit 53973b4d2c
4 changed files with 27 additions and 19 deletions

View File

@@ -55,3 +55,10 @@ compat_xml_parse_error = etree.ParseError
compat_xpath = lambda xpath: xpath
compat_zip = zip
workaround_optparse_bug9161 = lambda: None
def __getattr__(name):
if name in ('WINDOWS_VT_MODE', 'windows_enable_vt_mode'):
from .. import utils
return getattr(utils, name)
raise AttributeError(name)