Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ESP crash trace decoding to monitor #3383

Merged
merged 2 commits into from
Mar 11, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion platformio/commands/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def register_platform_filters(platform, project_dir, environment):
continue

dot = fn.find(".")
module = load_python_module("platformio.commands.device.monitor.%s" % fn[:dot], path)
module = load_python_module("platformio.commands.device.%s" % fn[:dot], path)
for key in dir(module):
member = getattr(module, key)
try:
Expand Down
2 changes: 1 addition & 1 deletion platformio/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def is_bytes(x):
def path_to_unicode(path):
Copy link
Contributor Author

@Tasssadar Tasssadar Feb 16, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This returns unicode if it already is unicode, but string if it isn't? Seemed like a bug to me, and it doesn't seem to be used anywhere yet, so I changed it to always return unicode (I needed it in the filter in plaftorm-espressif32).

if isinstance(path, unicode):
return path
return path.decode(get_filesystem_encoding()).encode("utf-8")
return path.decode(get_filesystem_encoding())

def hashlib_encode_data(data):
if is_bytes(data):
Expand Down