Skip to content

Adjust python 3 warning text and behaviour #900

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

Merged
merged 1 commit into from
Jun 19, 2019
Merged
Changes from all commits
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
6 changes: 1 addition & 5 deletions mbed/mbed.py
Original file line number Diff line number Diff line change
Expand Up @@ -3426,7 +3426,7 @@ def main():

# Python 3 backwards compatability warning
if sys.version_info[0] == 3:
warning("If you're using Python 3 with Mbed OS 5.8 and earlier versions, Python errors will occur when compiling, testing and exporting")
warning("Python 3 is not yet fully supported: Python errors may occur when compiling, testing and exporting")

pargs, remainder = parser.parse_known_args()
status = 1
Expand Down Expand Up @@ -3461,10 +3461,6 @@ def main():
if very_verbose:
traceback.print_exc(file=sys.stdout)
error("Unknown Error: %s" % e, 255)
finally:
Copy link
Collaborator

Choose a reason for hiding this comment

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

This was a strange thing to do in the first case, definitely good to remove it as it was generated even if there weren't any exceptions.

# Warn user if Python 3 might have caused an exception.
if status and sys.version_info[0] == 3:
warning("Using Python 3 with Mbed OS 5.8 and earlier can cause errors with compiling, testing and exporting");

sys.exit(status or 0)

Expand Down