Skip to content

Commit a8e7e7a

Browse files
committed
Drop Python 2
1 parent 94a54d3 commit a8e7e7a

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

monitor/filter_exception_decoder.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import sys
1919

2020
from platformio.commands.device import DeviceMonitorFilter
21-
from platformio.compat import path_to_unicode, WINDOWS, PY2
21+
from platformio.compat import path_to_unicode, WINDOWS
2222
from platformio.project.exception import PlatformioException
2323
from platformio.project.helpers import load_project_ide_data
2424

@@ -255,17 +255,12 @@ def get_lines(self, addresses):
255255

256256
enc = "mbcs" if WINDOWS else "utf-8"
257257
args = [self.addr2line_path, u"-fipC", u"-e", self.firmware_path]
258-
if PY2:
259-
args = [a.encode(enc) for a in args]
260258

261259
for addr in addresses:
262260
if not self.is_addr_ok(addr):
263261
result.append(None)
264262
continue
265263

266-
if PY2:
267-
addr = addr.encode(enc)
268-
269264
to_append = None
270265
try:
271266
output = (

0 commit comments

Comments
 (0)