Skip to content

Commit

Permalink
EspExceptionDecoder: fix linter warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Tasssadar committed Feb 15, 2020
1 parent c803aee commit d95ff83
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions platformio/commands/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,9 @@ def get_backtrace(self, match):
try:
args = [ self.addr2line_path, "-fipC", "-e", self.firmware_path ]
for i, addr in enumerate(match.group(1).split()):
output = subprocess.check_output(args + [ addr ]).decode("utf-8")
trace += " #%-2d %s in %s\n" % (i, addr, output.strip().replace(self.project_dir, ""))
output = subprocess.check_output(args + [ addr ]) \
.decode("utf-8").strip().replace(self.project_dir, "")
trace += " #%-2d %s in %s\n" % (i, addr, output)
except subprocess.CalledProcessError as e:
sys.stderr.write("%s: failed to call %s: %s\n" %
(self.__class__.__name__, self.addr2line_path, e))
Expand Down

0 comments on commit d95ff83

Please sign in to comment.