mirror of
https://github.com/esphome/esphome.git
synced 2026-06-24 12:53:26 +00:00
[espidf] Keep cmake output filter working when IDF writes raw bytes (#16642)
This commit is contained in:
@@ -164,6 +164,12 @@ def main() -> int:
|
||||
self._line_buffer = ""
|
||||
|
||||
def __getattr__(self, name: str):
|
||||
# Hide ``buffer`` so consumers that use either
|
||||
# ``getattr(stream, 'buffer', None)`` or
|
||||
# ``hasattr(stream, 'buffer')`` see this as a text-only stream
|
||||
# and skip writing raw bytes (which would bypass the filter).
|
||||
if name == "buffer":
|
||||
raise AttributeError(name)
|
||||
return getattr(self._stream, name)
|
||||
|
||||
def isatty(self) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user