Skip to content

Commit 74bd5b3

Browse files
committed
Add Python version detection and report error when using incompatible version #325
1 parent e54e066 commit 74bd5b3

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
@@ -2335,6 +2335,11 @@ def main():
23352335

23362336
# Help messages adapt based on current dir
23372337
cwd_root = os.getcwd()
2338+
2339+
if sys.version_info[0] != 2 or sys.version_info[1] < 7:
2340+
error(
2341+
"mbed CLI is compatible with Python version >= 2.7 and < 3.0\n"
2342+
"Please refer to the online guide available at https://github.com/ARMmbed/mbed-cli")
23382343

23392344
# Parse/run command
23402345
if len(sys.argv) <= 1:

0 commit comments

Comments
 (0)