Skip to content

Commit 9688618

Browse files
committed
clarify that IS_WINDOWS includes WSL
1 parent aad92c9 commit 9688618

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

mitmproxy/tools/console/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from mitmproxy.tcp import TCPFlow
1515

1616
# Detect Windows Subsystem for Linux and Windows
17-
IS_WINDOWS = "Microsoft" in platform.platform() or "Windows" in platform.platform()
17+
IS_WINDOWS_OR_WSL = "Microsoft" in platform.platform() or "Windows" in platform.platform()
1818

1919

2020
def is_keypress(k):

mitmproxy/tools/console/window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def keypress(self, size, k):
324324
class Screen(raw_display.Screen):
325325

326326
def write(self, data):
327-
if common.IS_WINDOWS:
327+
if common.IS_WINDOWS_OR_WSL:
328328
# replace urwid's SI/SO, which produce artifacts under WSL.
329329
# at some point we may figure out what they actually do.
330330
data = re.sub("[\x0e\x0f]", "", data)

0 commit comments

Comments
 (0)