-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Make mkdir.py work under python3 versions below 3.5 #8194
Conversation
…rduino.h, because this board has no build in lED
Because early versions of python3 did not have the optional arg "exist_ok" for "pathlib.Path(...).mkdir(...)" a build under this versions will abort with an error message. This PR will modify the python script so that it works even under python 3.4 (and below).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't change indents with patches. This and the other PY scripts are 4-space indented. Spacing changes like this make it hard to review/sync up.
Also, this seems like a spot where cascaded try (3.5+ version)
except all (<3.5 version)
would be better than examining python version numbers. Or, if the <3.5 version of Path.mkdir
works on >3.5, then just change it to use that API no matter what.
OK, I will upload a version that only use the <3.5 version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is much cleaner!
Because early versions of python3 did not have the optional arg "exist_ok" for "pathlib.Path(...).mkdir(...)" a build under this versions will abort with an error message. This PR will modify the python script so that it works even under python 3.4 (and below).