Skip to content

Fixes for premature error checking #1095

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 4 commits into from
May 14, 2015
Merged

Fixes for premature error checking #1095

merged 4 commits into from
May 14, 2015

Conversation

Pithikos
Copy link

@Pithikos Pithikos commented May 6, 2015

Some issues fixed:

  1. Added command validation before running a command. The validation assures that the command resolves to an executable file. Descriptive feedback is printed on error.
  2. Falsely giving errors for modules that have not been extracted from their .egg. These modules can be imported but false errors were given that they are not installed on the system.

Feedback example:

manos@box:~/tmp/mbed/workspace_tools$ python -B build.py -m LPC1768 -t uARM
..
ERROR: run_cmd: Command 'C:/Program Files/ARM/armcc_4.1_791/bin/armcc' can't be found

There was no path checking before running a command
resulting in a waste of time trying to find the
issue. This was amplified by the fact that no mention
of where the error occurs was made, and neither
which path that the error was raised for.
@Pithikos Pithikos closed this May 6, 2015
@Pithikos Pithikos reopened this May 6, 2015
False error was being given for egg modules that
have not been unzipped but were able to import.
Now __import__ is used for those cases as a last
check.
@Pithikos Pithikos changed the title Checking if path exists before running command Fixes for premature error checking May 6, 2015
@0xc0170
Copy link
Contributor

0xc0170 commented May 7, 2015

The change in run_cmd causes Travis to fail, can you look at the Travis output?

Pithikos added 2 commits May 7, 2015 15:06
cmd validation is run before executing a command. The validation
assures that the command resolves to a file that is executable. This
Use os.path.abspath for creating absolute path
from given command. This assures that it works
the same on all OSes.
0xc0170 added a commit that referenced this pull request May 14, 2015
Fixes for premature error checking
@0xc0170 0xc0170 merged commit 31db62f into ARMmbed:master May 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants