Skip to content

Commit 0394a87

Browse files
committed
Modifed Python 3 warning to only print after an Exception occurs.
1 parent 53c06cc commit 0394a87

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mbed/mbed.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3013,6 +3013,11 @@ def main():
30133013
if very_verbose:
30143014
traceback.print_exc(file=sys.stdout)
30153015
error("Unknown Error: %s" % e, 255)
3016+
finally:
3017+
# Warn user if Python 3 might have caused an exception.
3018+
if status and sys.version_info[0] == 3:
3019+
warning("Using Python 3 with Mbed OS 5.8 and earlier can cause errors with compiling, testing and exporting");
3020+
30163021
sys.exit(status or 0)
30173022

30183023

0 commit comments

Comments
 (0)