Skip to content

Commit a4957d0

Browse files
committed
Drop Python 2
1 parent acfd7cf commit a4957d0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

monitor/filter_exception_decoder.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import subprocess
1818
import sys
1919

20-
from platformio.compat import path_to_unicode, WINDOWS, PY2
20+
from platformio.compat import path_to_unicode, WINDOWS
2121
from platformio.project.exception import PlatformioException
2222
from platformio.project.helpers import load_project_ide_data
2323
from platformio.commands.device import DeviceMonitorFilter
@@ -111,12 +111,8 @@ def get_backtrace(self, match):
111111
trace = ""
112112
enc = "mbcs" if WINDOWS else "utf-8"
113113
args = [self.addr2line_path, u"-fipC", u"-e", self.firmware_path]
114-
if PY2:
115-
args = [a.encode(enc) for a in args]
116114
try:
117115
for i, addr in enumerate(match.group(1).split()):
118-
if PY2:
119-
addr = addr.encode(enc)
120116
output = (
121117
subprocess.check_output(args + [addr])
122118
.decode(enc)

0 commit comments

Comments
 (0)